File tree Expand file tree Collapse file tree 1 file changed +6
-4
lines changed
stac_fastapi/elasticsearch/tests/clients Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Original file line number Diff line number Diff line change 14
14
TransactionsClient ,
15
15
)
16
16
from stac_fastapi .types .errors import ConflictError , NotFoundError
17
-
17
+ from stac_fastapi .extensions .third_party .bulk_transactions import (
18
+ Items ,
19
+ )
18
20
19
21
def test_create_collection (
20
22
es_core : CoreCrudClient ,
@@ -269,16 +271,16 @@ def test_bulk_item_insert(
269
271
270
272
item = load_test_data ("test_item.json" )
271
273
272
- items = []
274
+ items = {}
273
275
for _ in range (10 ):
274
276
_item = deepcopy (item )
275
277
_item ["id" ] = str (uuid .uuid4 ())
276
- items . append ( _item )
278
+ items [ _item [ "id" ]] = _item
277
279
278
280
# fc = es_core.item_collection(coll["id"], request=MockStarletteRequest)
279
281
# assert len(fc["features"]) == 0
280
282
281
- es_bulk_transactions .bulk_item_insert (items = items )
283
+ es_bulk_transactions .bulk_item_insert (Items ( items = items ) )
282
284
time .sleep (3 )
283
285
fc = es_core .item_collection (coll ["id" ], request = MockStarletteRequest )
284
286
assert len (fc ["features" ]) >= 10
You can’t perform that action at this time.
0 commit comments