Skip to content

Commit 7d52cfa

Browse files
committed
fixed the follow test by making sure we dont always end up in the same aggregation
1 parent fec06d4 commit 7d52cfa

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

‎stream/tests.py‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
import time
44
from stream.exceptions import ApiKeyException, InputException,\
55
CustomFieldException
6+
import random
67

78

89
class ClientTest(TestCase):
@@ -32,7 +33,8 @@ def test_remove_activity(self):
3233
self.assertNotEqual(activities[0]['id'], activity_id)
3334

3435
def test_follow(self):
35-
activity_data = {'actor': 1, 'verb': 'tweet', 'object': 1}
36+
actor_id = random.randint(10, 100000)
37+
activity_data = {'actor': actor_id, 'verb': 'tweet', 'object': 1}
3638
activity_id = self.user1.add_activity(activity_data)['id']
3739
self.aggregated2.follow('user:1')
3840
time.sleep(10)

0 commit comments

Comments
 (0)