예제 #1
0
    def test_get_all_no_results(self):
        # arrange
        expected_comments = []

        # act
        result_comments = CommentDBRepo.get_all(1)

        # accert
        assert result_comments == expected_comments
예제 #2
0
    def test_get_all_success(self, comments_20):
        # arrange
        expected_comments = []
        for g in comments_20:
            expected_comments.append(CommentDBRepo.decode_orm_comment(g))

        # act
        result_comments = CommentDBRepo.get_all(expected_comments[0].film)

        # assert
        for i in range(10):
            assert result_comments[i].text == expected_comments[i].text