From 462c8aeac9f7b052afb2f32c2f157e6ef3effb01 Mon Sep 17 00:00:00 2001 From: claudi Date: Tue, 3 Mar 2026 13:01:44 +0100 Subject: [PATCH] fix: update asset page result assertions and correct search term field name --- tests/test_models.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/tests/test_models.py b/tests/test_models.py index 881dd00..d1afecd 100644 --- a/tests/test_models.py +++ b/tests/test_models.py @@ -31,8 +31,8 @@ class TestAssetModel: "assets": [{"id": "a1"}, {"id": "a2"}], "size": 2, }) - assert len(result.assets) == 2 - assert result.assets[0].id == "a1" + assert result.page_size == 2 + assert result.page and result.page[0].id == "a1" def test_extra_fields_allowed(self): """Unknown API fields must not raise ValidationError.""" @@ -62,9 +62,9 @@ class TestSearchModels: assert opts.limit is None def test_search_options_with_values(self): - opts = AzSearchOptions(searchterm="hello", limit=5) + opts = AzSearchOptions(searchString="hello", limit=5) dumped = opts.model_dump(exclude_none=True) - assert dumped["searchterm"] == "hello" + assert dumped["searchString"] == "hello" assert dumped["limit"] == 5 def test_search_result_minimal(self):