Skip to content

Commit 70660e9

Browse files
committed
Fixes unit tests
1 parent 5c42cb8 commit 70660e9

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

ads/aqua/common/utils.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -553,7 +553,7 @@ def service_config_path():
553553
return f"oci://{AQUA_SERVICE_MODELS_BUCKET}@{CONDA_BUCKET_NS}/service_models/config"
554554

555555

556-
@cached(cache=TTLCache(maxsize=1, ttl=timedelta(hours=1), timer=datetime.now))
556+
@cached(cache=TTLCache(maxsize=1, ttl=timedelta(minutes=10), timer=datetime.now))
557557
def get_container_config():
558558
config = load_config(
559559
file_path=service_config_path(),

tests/unitary/with_extras/aqua/test_model.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -365,6 +365,7 @@ def test_create_model(self, mock_from_id, mock_validate, mock_create):
365365
"verified",
366366
],
367367
)
368+
@patch("ads.aqua.model.model.get_container_config")
368369
@patch("ads.aqua.model.model.read_file")
369370
@patch.object(DataScienceModel, "from_id")
370371
@patch(
@@ -376,8 +377,8 @@ def test_get_foundation_models(
376377
mock_get_artifact_path,
377378
mock_from_id,
378379
mock_read_file,
379-
foundation_model_type,
380380
mock_get_container_config,
381+
foundation_model_type,
381382
mock_auth,
382383
):
383384
mock_get_container_config.return_value = get_container_config()

0 commit comments

Comments
 (0)