def test_handle_send_is_called(self, mock_maker, mock_send): send_share(self.share.id) mock_send.assert_called_once_with( "entity", self.share.author.federable, [self.content.author.handle], )
def test_handle_send_is_called(self, mock_maker, mock_send): send_share(self.share.id) mock_send.assert_called_once_with( "entity", self.share.author.federable, [self.content.author.handle], )
def test_handle_send_is_called(self, mock_maker, mock_send): send_share(self.share.id) mock_send.assert_called_once_with( "entity", self.share.author, [generate_diaspora_profile_id(self.content.author.handle, self.content.author.guid)], )
def test_handle_send_is_called(self, mock_maker, mock_send): post = Post() mock_maker.return_value = post send_share(self.share.id, self.share.activities.first().fid) mock_send.assert_called_once_with( post, self.share.author.federable, [self.content.author.get_recipient_for_visibility(self.share.visibility)], )
def test_doesnt_send_to_local_share_author(self, mock_maker, mock_send): send_share(self.local_share.id) mock_send.assert_called_once_with("entity", self.local_share.author.federable, [])
def test_content_not_sent_in_debug_mode(self, mock_send): send_share(self.share.id) self.assertTrue(mock_send.called is False)
def test_warning_is_logged_on_no_entity(self, mock_logger, mock_maker): send_share(self.share.id) self.assertTrue(mock_logger.called)
def test_only_public_share_calls_make_federable_content(self, mock_maker): send_share(self.limited_share.id) self.assertTrue(mock_maker.called is False) send_share(self.share.id) mock_maker.assert_called_once_with(self.share)
def test_content_not_sent_in_debug_mode(self, mock_send): send_share(self.share.id) mock_send.assert_not_called()
def test_doesnt_send_to_local_share_author(self, mock_maker, mock_send): post = Post() mock_maker.return_value = post send_share(self.local_share.id, self.local_share.activities.first().fid) mock_send.assert_called_once_with(post, self.local_share.author.federable, [])
def test_doesnt_send_to_local_share_author(self, mock_maker, mock_send): send_share(self.local_share.id) mock_send.assert_called_once_with("entity", self.local_share.author.federable, [])
def test_content_not_sent_in_debug_mode(self, mock_send): send_share(self.share.id) self.assertTrue(mock_send.called is False)
def test_warning_is_logged_on_no_entity(self, mock_logger, mock_maker): send_share(self.share.id) self.assertTrue(mock_logger.called)
def test_only_public_share_calls_make_federable_content(self, mock_maker): send_share(self.limited_share.id) self.assertTrue(mock_maker.called is False) send_share(self.share.id) mock_maker.assert_called_once_with(self.share)