def test_task__delete_model_with_artifacts(task_b: Task, model, artifact_repo): model._unpersisted_artifacts = Blobs({'data': InMemoryBlob(b'data')}) task_b.bind_artifact_repo(artifact_repo) task_b.push_model(model) assert model.id is not None assert model.task_id is not None task_b.delete_model(model) assert len(task_b.models) == 0 assert model.id is None assert model.task_id is None
def task_b2(task_b: Task): task_b.bind_artifact_repo(InMemoryArtifactRepository()) return task_b