def test_get_projects_returns_all_the_projects(ltd_client: ListTheDocs): ltd_client.add_project( Project(title='test_project1', description='description1')) ltd_client.add_project( Project(title='test_project2', description='description2', logo='img.png')) projects = ltd_client.get_projects() assert isinstance(projects, tuple) assert len(projects) == 2 assert projects[0].code == 'test_project1' assert projects[0].title == 'test_project1' assert projects[0].description == 'description1' assert projects[0].logo is None assert projects[1].code == 'test_project2' assert projects[1].title == 'test_project2' assert projects[1].description == 'description2' assert projects[1].logo == 'img.png'
def test_get_projects_where_none_exists(ltd_client: ListTheDocs): projects = ltd_client.get_projects() assert len(projects) == 0