Example #1
0
def test_repository_can_retrieve_director(session_factory):
    repo = SqlAlchemyRepository(session_factory)
    name = "James Gunn"
    director = repo.get_director(name)

    assert director.director_full_name == name
Example #2
0
def test_repository_returns_none_for_non_existent_director(session_factory):
    repo = SqlAlchemyRepository(session_factory)
    name = "Sam sam"
    director = repo.get_director(name)
    assert director is None
def test_add_and_get_director(session_factory):
    repository = SqlAlchemyRepository(session_factory)
    repository.add_director(Director("Mari Okada"))
    assert repository.get_director(
        "Mari Okada").director_full_name == "Mari Okada"
    assert repository.get_director("Mari Omada") is None