def test_repository_returns_date_of_previous_movie(session_factory): repo = SqlAlchemyRepository(session_factory) movie = repo.get_movie(6) previous_date = repo.get_date_of_previous_movie(movie) assert previous_date == 2016
def test_repository_returns_none_when_there_are_no_previous_movies( session_factory): repo = SqlAlchemyRepository(session_factory) movie = repo.get_movie(1) previous_date = repo.get_date_of_previous_movie(movie) assert previous_date is None