コード例 #1
0
    def test_get_fail_not_normal(self):
        # arrange
        test_id = -100

        # act
        result_film = FilmDBRepo.get(film_id=test_id)

        # assert
        assert result_film is None
コード例 #2
0
    def test_get_fail_not_found(self):
        # arrange
        test_id = 1

        # act
        result_film = FilmDBRepo.get(film_id=test_id)

        # assert
        assert result_film is None
コード例 #3
0
    def test_get_success(self, simple_film):
        # arrange
        expected_film = FilmDBRepo.decode_orm_film(simple_film)
        test_id = simple_film.id

        # act
        result_film = FilmDBRepo.get(film_id=test_id)

        # assert
        assert result_film.title == expected_film.title