def test_update_downloads(project_repository: DBProjectRepository): project = ProjectStub.create() project_repository.save_projects([project]) project_downloads = ProjectDownloadsStub.create(name=project.name) project_repository.update_downloads([project_downloads]) result = project_repository.find(project.name) assert project_downloads.downloads.value + project.downloads.value == result.downloads.value
def test_find_project(project_repository: DBProjectRepository): project = ProjectStub.create() project_repository.save_projects([project]) result = project_repository.find(project.name) assert isinstance(result, Project) assert project.name.name == result.name.name assert project.downloads.value == result.downloads.value