query_available_models() -> list[str] -> check_model_availability(model) -> bool

This commit is contained in:
Matthew Farrellee 2025-07-14 19:20:15 -04:00
parent c2ab8988e6
commit f69ae45127
2 changed files with 10 additions and 5 deletions

View file

@ -344,8 +344,8 @@ class TestNvidiaPostTraining(unittest.TestCase):
)
# simulate a NIM where default/job-1234 is an available model
with patch.object(self.inference_adapter, "query_available_models", new_callable=AsyncMock) as mock_query:
mock_query.return_value = [model_id]
with patch.object(self.inference_adapter, "check_model_availability", new_callable=AsyncMock) as mock_check:
mock_check.return_value = True
result = self.run_async(self.inference_adapter.register_model(model))
assert result == model
assert len(self.inference_adapter.alias_to_provider_id_map) > 1