@@ -110,7 +110,8 @@ def test_client_openapi(TestCoreClient):
110
110
assert component in test_app .app .openapi_schema ["components" ]["schemas" ]
111
111
112
112
113
- def test_filter_extension (TestCoreClient , item_dict ):
113
+ @pytest .mark .parametrize ("validate" , [True , False ])
114
+ def test_filter_extension (validate , TestCoreClient , item_dict ):
114
115
"""Test if Filter Parameters are passed correctly."""
115
116
116
117
class FilterClient (TestCoreClient ):
@@ -159,13 +160,15 @@ def get_search(
159
160
post_request_model = create_post_request_model ([FilterExtension ()])
160
161
161
162
test_app = app .StacApi (
162
- settings = ApiSettings (),
163
+ settings = ApiSettings (enable_response_models = validate ),
163
164
client = FilterClient (post_request_model = post_request_model ),
164
165
search_get_request_model = create_get_request_model ([FilterExtension ()]),
165
166
search_post_request_model = post_request_model ,
167
+ extensions = [FilterExtension ()],
166
168
)
167
169
168
170
with TestClient (test_app .app ) as client :
171
+ landing = client .get ("/" )
169
172
get_search = client .get (
170
173
"/search" ,
171
174
params = {
@@ -184,5 +187,6 @@ def get_search(
184
187
},
185
188
)
186
189
190
+ assert landing .status_code == 200 , landing .text
187
191
assert get_search .status_code == 200 , get_search .text
188
192
assert post_search .status_code == 200 , post_search .text
0 commit comments