Skip to content

Commit b6691c1

Browse files
committed
fix: address review comments
Signed-off-by: Debarati Basu-Nag <dbasunag@redhat.com>
1 parent 527dc66 commit b6691c1

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

tests/model_registry/model_catalog/huggingface/test_huggingface_models_multiple_sources.py

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,12 +50,20 @@ def test_source_status_duplicate_models(
5050
headers=model_registry_rest_headers,
5151
)
5252
sources = response.get("items", [])
53+
expected_source_ids = {MIXED_SOURCE_ID, OVERLAPPING_SOURCE_ID}
54+
found_source_ids = set()
5355
for source in sources:
54-
if source["id"] in [MIXED_SOURCE_ID, OVERLAPPING_SOURCE_ID]:
56+
if source["id"] in expected_source_ids:
57+
found_source_ids.add(source["id"])
5558
assert source["status"] == "available", (
5659
f"Source '{source['id']}' has status '{source['status']}', expected 'available'. "
5760
f"Error: {source.get('error', 'N/A')}"
5861
)
62+
missing_sources = expected_source_ids - found_source_ids
63+
assert not missing_sources, (
64+
f"Expected sources {missing_sources} not found in response. "
65+
f"Available source IDs: {[s['id'] for s in sources]}"
66+
)
5967

6068
def test_shared_model_present_in_both_sources(
6169
self: Self,

0 commit comments

Comments
 (0)