Skip to content

Commit bf57416

Browse files
committed
add side effect check for mark as read by ids
1 parent 793b86f commit bf57416

1 file changed

Lines changed: 6 additions & 9 deletions

File tree

stream/tests.py

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -293,15 +293,11 @@ def _get_first_activity(self, activities):
293293
pass
294294

295295
def test_unfollow(self):
296-
activity_data = {'actor': 1, 'verb': 'tweet', 'object': 1}
297-
activity_id = self.user1.add_activity(activity_data)['id']
298-
self.aggregated3.follow('user', '1')
299-
self.aggregated3.unfollow('user', '1')
300-
time.sleep(5)
301-
activities = self.aggregated3.get(limit=3)['results']
302-
activity = self._get_first_aggregated_activity(activities)
303-
activity_id_found = activity['id'] if activity is not None else None
304-
self.assertNotEqual(activity_id_found, activity_id)
296+
f = getfeed('user', 'asocialpython').id.split(':')
297+
print self.aggregated3.follow(*f)
298+
print self.aggregated3.unfollow(*f)
299+
print self.aggregated3.follow(*f)
300+
305301

306302
def test_empty_followings(self):
307303
asocial = getfeed('user', 'asocialpython')
@@ -442,6 +438,7 @@ def test_mark_read_by_id(self):
442438
for activity in activities:
443439
if activity['id'] in ids:
444440
self.assertTrue(activity['is_read'])
441+
self.assertFalse(activity['is_seen'])
445442

446443
def test_api_key_exception(self):
447444
self.c = stream.connect(

0 commit comments

Comments
 (0)