Skip to content

Commit

Permalink
Try to fix race condition
Browse files Browse the repository at this point in the history
  • Loading branch information
julien-lang committed Sep 8, 2023
1 parent 7907787 commit e29664c
Showing 1 changed file with 12 additions and 2 deletions.
14 changes: 12 additions & 2 deletions tests/test_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -1726,8 +1726,13 @@ def test_followers(self):
assert(result['followed'])

result = self.sg.followers(self.shot)

result = list(filter(
lambda c: c['type'] == 'HumanUser' and c['id'] == self.human_user['id'],
result,
))

self.assertEqual(1, len(result))
self.assertEqual(self.human_user['id'], result[0]['id'])

def test_following(self):
'''Test following method'''
Expand All @@ -1740,8 +1745,13 @@ def test_following(self):
assert(result['followed'])

result = self.sg.following(self.human_user)

result = list(filter(
lambda c: c['type'] == 'Shot' and c['id'] == self.shot['id'],
result,
))

self.assertEqual(1, len(result))
self.assertEqual(self.shot['id'], result[0]['id'])

result = self.sg.follow(self.human_user, self.task)
assert(result['followed'])
Expand Down

0 comments on commit e29664c

Please sign in to comment.