Skip to content

Commit 89989b0

Browse files
committed
minor change in unit test
1 parent d746129 commit 89989b0

File tree

1 file changed

+14
-1
lines changed

1 file changed

+14
-1
lines changed

metadata-ingestion/tests/unit/test_vertexai_source.py

+14-1
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ def test_real_model_workunit(source, real_model, model_version):
116116

117117

118118
@patch("google.cloud.aiplatform.Model.list")
119-
def test_mock_models_workunits(
119+
def test_mock_models_and_versions_workunits(
120120
mock_list, source, real_model, model_version, mock_models
121121
):
122122
mock_list.return_value = mock_models
@@ -131,6 +131,19 @@ def test_mock_models_workunits(
131131
assert wcs[1].metadata.aspect.createdAt == mock_models[1].create_time
132132

133133

134+
@pytest.mark.skip(reason="Skipping, this is for debugging purpose")
135+
def test_real_models_and_versions_workunits(source):
136+
"""
137+
Disabled as default
138+
Use real model registered in the Vertex AI Model Registry
139+
"""
140+
wcs = [wc for wc in source._get_ml_model_workunits()]
141+
assert len(wcs) == 2
142+
# aspect is MLModelGroupPropertiesClass or MLModelPropertiesClass
143+
# assert using real name in GCP model registry
144+
# assert wcs[0].metadata.aspect.name == "mock_prediction_model_1"
145+
146+
134147
def test_config_model_name_separator(source, model_version):
135148
name_version_sep = "+"
136149
source.config.model_name_separator = name_version_sep

0 commit comments

Comments
 (0)