def test_should_get_post_activity(self): post_repository_mock = Mock() when(post_repository_mock).activity("123guid", "123pubid", 5).thenReturn("activity") post = Post() post.post_repository = post_repository_mock post.guid = "123guid" post.pubid = "123pubid" assert post.activity(count=5) == "activity"
def test_should_get_post_activity(self): post_repository_mock = Mock() when(post_repository_mock).activity('123guid', '123pubid', 5).thenReturn('activity') post = Post() post.post_repository = post_repository_mock post.guid = '123guid' post.pubid = '123pubid' assert post.activity(count=5) == 'activity'