def test_delete_artifact(art_repo: ArtifactRepository, model: Model): art_repo.push_artifact(model, {}) art_repo.get_artifact(model) art_repo.delete_artifact(model) with pytest.raises(NoSuchArtifactError): art_repo.get_artifact(model) art_repo.push_artifact(model, {})
def test_get_artifact(art_repo: ArtifactRepository, model: Model, blobs: Dict[str, InMemoryBlob]): artifact: ArtifactCollection = art_repo.push_artifact(model, blobs) new_artifact = art_repo.get_artifact(model) assert new_artifact == artifact
def test_push_non_existing_artifact(art_repo: ArtifactRepository, model: Model): with pytest.raises(NoSuchArtifactError): art_repo.get_artifact(model)
def test_get_artifact__non_saved_model(art_repo: ArtifactRepository, model: Model): model._id = None with pytest.raises(ValueError): art_repo.get_artifact(model)