def test_follow(self): """Test bulk following""" public_foia = FOIARequestFactory() private_foia = FOIARequestFactory(embargo=True) user = UserFactory() RequestList()._follow( FOIARequest.objects.filter( pk__in=[public_foia.pk, private_foia.pk]), user, {}, ) ok_(is_following(user, public_foia)) assert_false(is_following(user, private_foia))
def test_unfollow(self): """Test bulk unfollowing""" follow_foia = FOIARequestFactory() unfollow_foia = FOIARequestFactory() user = UserFactory() follow(user, follow_foia, actor_only=False) RequestList()._unfollow( FOIARequest.objects.filter( pk__in=[follow_foia.pk, unfollow_foia.pk]), user, {}, ) assert_false(is_following(user, follow_foia)) assert_false(is_following(user, unfollow_foia))