예제 #1
0
    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"
예제 #2
0
    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'