def test_repository_returns_none_when_there_are_no_subsequent_articles(session_factory): repo = SqlAlchemyRepository(session_factory) article = repo.get_article(177) next_date = repo.get_date_of_next_article(article) assert next_date is None
def test_repository_returns_date_of_next_article(session_factory): repo = SqlAlchemyRepository(session_factory) article = repo.get_article(3) next_date = repo.get_date_of_next_article(article) assert next_date.isoformat() == '2020-03-05'