Skip to content

Commit

Permalink
Add tests for system.artifact type
Browse files Browse the repository at this point in the history
  • Loading branch information
SinaChavoshi committed Jun 23, 2022
1 parent 6311bfd commit 04c9e88
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions tests/unit/aiplatform/test_metadata_schema.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down

0 comments on commit 04c9e88

Please sign in to comment.