File tree Expand file tree Collapse file tree 1 file changed +20
-0
lines changed
stac_fastapi/sqlalchemy/tests/api Expand file tree Collapse file tree 1 file changed +20
-0
lines changed Original file line number Diff line number Diff line change @@ -285,3 +285,23 @@ def test_search_line_string_intersects(
285
285
assert resp .status_code == 200
286
286
resp_json = resp .json ()
287
287
assert len (resp_json ["features" ]) == 1
288
+
289
+
290
+ def test_app_fields_extension_return_all_properties (
291
+ load_test_data , app_client , postgres_transactions
292
+ ):
293
+ item = load_test_data ("test_item.json" )
294
+ postgres_transactions .create_item (item , request = MockStarletteRequest )
295
+
296
+ resp = app_client .get (
297
+ "/search" , params = {"collections" : ["test-collection" ], "fields" : "properties" }
298
+ )
299
+ assert resp .status_code == 200
300
+ resp_json = resp .json ()
301
+ feature = resp_json ["features" ][0 ]
302
+ assert len (feature ["properties" ]) >= len (item ["properties" ])
303
+ for expected_prop , expected_value in item ["properties" ].items ():
304
+ if expected_prop in ("datetime" , "created" , "updated" ):
305
+ assert feature ["properties" ][expected_prop ][0 :19 ] == expected_value [0 :19 ]
306
+ else :
307
+ assert feature ["properties" ][expected_prop ] == expected_value
You can’t perform that action at this time.
0 commit comments