def test_delete_artifact_and_file(self, model_with_artifact, test_user_clients, role):
        """
        <b>Description:</b>
        Delete artifact file from model.

        <b>Input data:</b>
        1. Example model with artifact existing on models list in model catalog.
        2. User
        3. User role (user or role)

        <b>Expected results:</b>
        Test passes when artifact file and metadata are deleted from model successfully.

        <b>Steps:</b>
        1. Get artifact id.
        2. Delete artifact file from model.
        3. Try to get artifact file.
        4. Try to get artifact metadata.
        """
        client = test_user_clients[role]
        artifact_id = model_with_artifact.artifacts[0].get("id")
        step("Delete artifact {} of model {} using {}".format(artifact_id, model_with_artifact.id, client))
        ModelArtifact.delete_artifact(model_id=model_with_artifact.id, artifact_id=artifact_id,
                                      client=client)
        assert_raises_http_exception(HttpStatus.CODE_NOT_FOUND, HttpStatus.MSG_NOT_FOUND,
                                     model_catalog_api.get_model_artifact_file, model_id=model_with_artifact.id,
                                     artifact_id=artifact_id)
        assert_raises_http_exception(HttpStatus.CODE_NOT_FOUND, HttpStatus.MSG_NOT_FOUND,
                                     model_catalog_api.get_model_artifact_metadata, model_id=model_with_artifact.id,
                                     artifact_id=artifact_id)
    def test_cannot_delete_artifact_twice(self, model_with_artifact):
        """
        <b>Description:</b>
        Try to delete artifact twice from model.

        <b>Input data:</b>
        1. Example model with artifact existing on models list in model catalog.

        <b>Expected results:</b>
        Test passes when model catalog returns a 404 http status.

        <b>Steps:</b>
        1. Get artifact id.
        2. Delete artifact from model.
        3. Try to delete the same artifact again.
        """
        artifact_id = model_with_artifact.artifacts[0].get("id")
        step("Delete artifact {} of model {}".format(artifact_id, model_with_artifact.id))
        ModelArtifact.delete_artifact(model_id=model_with_artifact.id, artifact_id=artifact_id)
        step("Try to delete the same artifact from model for the second time")
        assert_raises_http_exception(HttpStatus.CODE_NOT_FOUND, HttpStatus.MSG_NOT_FOUND,
                                     ModelArtifact.delete_artifact, model_id=model_with_artifact.id,
                                     artifact_id=artifact_id)