From 04c9e8838e926cb527faca6b9e1bb5e87b54144b Mon Sep 17 00:00:00 2001 From: sina chavoshi Date: Thu, 23 Jun 2022 04:17:44 +0000 Subject: [PATCH] Add tests for system.artifact type --- tests/unit/aiplatform/test_metadata_schema.py | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/tests/unit/aiplatform/test_metadata_schema.py b/tests/unit/aiplatform/test_metadata_schema.py index 760d668ac6..3f31c170b2 100644 --- a/tests/unit/aiplatform/test_metadata_schema.py +++ b/tests/unit/aiplatform/test_metadata_schema.py @@ -410,6 +410,24 @@ def test_system_dataset_constructor_parameters_are_set_correctly(self): assert artifact.metadata == _TEST_UPDATED_METADATA assert artifact.schema_version == _TEST_SCHEMA_VERSION + def test_system_artifact_schema_title_is_set_correctly(self): + artifact = system_artifact_schema.Artifact() + assert artifact.schema_title == "system.Artifact" + + def test_system_artifact_constructor_parameters_are_set_correctly(self): + artifact = system_artifact_schema.Artifact( + uri=_TEST_URI, + display_name=_TEST_DISPLAY_NAME, + schema_version=_TEST_SCHEMA_VERSION, + description=_TEST_DESCRIPTION, + metadata=_TEST_UPDATED_METADATA, + ) + assert artifact.uri == _TEST_URI + assert artifact.display_name == _TEST_DISPLAY_NAME + assert artifact.description == _TEST_DESCRIPTION + assert artifact.metadata == _TEST_UPDATED_METADATA + assert artifact.schema_version == _TEST_SCHEMA_VERSION + def test_system_model_schema_title_is_set_correctly(self): artifact = system_artifact_schema.Model() assert artifact.schema_title == "system.Model"