@@ -110,7 +110,8 @@ def test_client_openapi(TestCoreClient):
110110 assert component in test_app .app .openapi_schema ["components" ]["schemas" ]
111111
112112
113- def test_filter_extension (TestCoreClient , item_dict ):
113+ @pytest .mark .parametrize ("validate" , [True , False ])
114+ def test_filter_extension (validate , TestCoreClient , item_dict ):
114115 """Test if Filter Parameters are passed correctly."""
115116
116117 class FilterClient (TestCoreClient ):
@@ -159,13 +160,15 @@ def get_search(
159160 post_request_model = create_post_request_model ([FilterExtension ()])
160161
161162 test_app = app .StacApi (
162- settings = ApiSettings (),
163+ settings = ApiSettings (enable_response_models = validate ),
163164 client = FilterClient (post_request_model = post_request_model ),
164165 search_get_request_model = create_get_request_model ([FilterExtension ()]),
165166 search_post_request_model = post_request_model ,
167+ extensions = [FilterExtension ()],
166168 )
167169
168170 with TestClient (test_app .app ) as client :
171+ landing = client .get ("/" )
169172 get_search = client .get (
170173 "/search" ,
171174 params = {
@@ -184,5 +187,6 @@ def get_search(
184187 },
185188 )
186189
190+ assert landing .status_code == 200 , landing .text
187191 assert get_search .status_code == 200 , get_search .text
188192 assert post_search .status_code == 200 , post_search .text
0 commit comments