Exemple #1
0
def test_delete_artifact(art_repo: ArtifactRepository, model: Model):
    art_repo.push_model_artifact(model, {})
    art_repo.get_model_artifact(model)
    art_repo.delete_model_artifact(model)
    with pytest.raises(NoSuchArtifactError):
        art_repo.get_model_artifact(model)
    art_repo.push_model_artifact(model, {})
Exemple #2
0
def test_delete_non_existing_artifact(art_repo: ArtifactRepository,
                                      model: Model):
    with pytest.raises(NoSuchArtifactError):
        art_repo.delete_model_artifact(model)
Exemple #3
0
def test_delete_artifact__non_saved_model(art_repo: ArtifactRepository,
                                          model: Model):
    model._id = None

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