Ejemplo n.º 1
0
 def test_send_follow_change(self, mock_send, mock_payload):
     send_follow_change(self.profile.id, self.remote_profile.id, True)
     mock_send.assert_called_once_with(
         "https://%s/receive/users/%s" %
         (self.remote_profile.handle.split("@")[1],
          self.remote_profile.guid),
         "payload",
     )
Ejemplo n.º 2
0
 def test_send_follow_change(self, mock_follow, mock_profile, mock_send):
     send_follow_change(self.profile.id, self.remote_profile.id, True)
     mock_send.assert_called_once_with(
         "entity",
         self.profile.federable,
         [self.remote_profile.get_recipient_for_visibility(Visibility.LIMITED)],
     )
     mock_profile.assert_called_once_with(self.profile.id, recipients=[
         self.remote_profile.get_recipient_for_visibility(Visibility.LIMITED),
     ])
Ejemplo n.º 3
0
 def test_send_follow_change(self, mock_follow, mock_profile, mock_send):
     send_follow_change(self.profile.id, self.remote_profile.id, True)
     mock_send.assert_called_once_with(
         "entity",
         self.profile.federable,
         [(self.remote_profile.handle, self.remote_profile.key, self.remote_profile.guid)],
     )
     mock_profile.assert_called_once_with(self.profile.id, recipients=[
         self.remote_profile.handle,
     ])
Ejemplo n.º 4
0
 def test_send_follow_change(self, mock_follow, mock_profile, mock_send):
     send_follow_change(self.profile.id, self.remote_profile.id, True)
     mock_send.assert_called_once_with(
         "entity",
         self.profile.federable,
         [(self.remote_profile.handle, self.remote_profile.key,
           self.remote_profile.guid)],
     )
     mock_profile.assert_called_once_with(self.profile.id,
                                          recipients=[
                                              self.remote_profile.handle,
                                          ])
Ejemplo n.º 5
0
 def test_send_follow_change(self, mock_follow, mock_profile, mock_send):
     send_follow_change(self.profile.id, self.remote_profile.id, True)
     mock_send.assert_called_once_with(
         "entity",
         self.profile,
         [(generate_diaspora_profile_id(
             self.remote_profile.handle, self.remote_profile.guid
         ), self.remote_profile.key)],
     )
     mock_profile.assert_called_once_with(self.profile.id, recipients=[
         generate_diaspora_profile_id(self.remote_profile.handle, self.remote_profile.guid),
     ])