def test_calls_update_streams_with_content(self, mock_update):
# Calls on create
content = ContentFactory()
mock_update.assert_called_once_with(content)
mock_update.reset_mock()
# Does not call on update
content.text = "update!"
content.save()
self.assertFalse(mock_update.called)
评论列表
文章目录