コード例 #1
0
 def test_follower_not_added_on_not_following(self):
     process_entity_relationship(
         base.Relationship(target_handle=self.profile.handle,
                           relationship="sharing"),
         self.remote_profile,
     )
     self.assertEqual(self.remote_profile.following.count(), 0)
コード例 #2
0
 def setUpTestData(cls):
     super().setUpTestData()
     cls.post = entities.PostFactory()
     cls.comment = base.Comment()
     cls.retraction = base.Retraction()
     cls.relationship = base.Relationship()
     cls.follow = base.Follow()
コード例 #3
0
 def test_follower_added_sends_a_notification(self, mock_enqueue):
     process_entity_relationship(
         base.Relationship(target_handle=self.profile.handle,
                           relationship="following"),
         self.remote_profile,
     )
     mock_enqueue.assert_called_once_with(send_follow_notification,
                                          self.remote_profile.id,
                                          self.profile.id)