예제 #1
0
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, {})
예제 #2
0
def test_delete_non_existing_artifact(art_repo: ArtifactRepository,
                                      model: Model):
    with pytest.raises(NoSuchArtifactError):
        art_repo.delete_artifact(model)
예제 #3
0
def test_delete_artifact__non_saved_model(art_repo: ArtifactRepository,
                                          model: Model):
    model._id = None

    with pytest.raises(ValueError):
        art_repo.delete_artifact(model)