def test_repository_returns_date_of_next_movie(session_factory): repo = SqlAlchemyRepository(session_factory) movie = repo.get_movie(3) next_date = repo.get_date_of_next_movie(movie) assert next_date == 2016
def test_repository_returns_none_when_there_are_no_subsequent_movies( session_factory): repo = SqlAlchemyRepository(session_factory) movie = repo.get_movie(100) next_date = repo.get_date_of_next_movie(movie) assert next_date is None