Skip to content

Commit 3dd1fc6

Browse files
committed
tests: create collection index
1 parent 4045f76 commit 3dd1fc6

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

tests/test_collection.py

+2
Original file line numberDiff line numberDiff line change
@@ -254,5 +254,7 @@ def test_collection_utf8(db, db_version, special_collection_names):
254254
col = db.create_collection(name)
255255
assert col.name == name
256256
assert db.has_collection(name) is True
257+
index_id = col.add_hash_index(fields=['foo'])['name']
258+
assert index_id == col.indexes()[-1]['name']
257259
assert db.delete_collection(name) is True
258260
assert db.has_collection(name) is False

0 commit comments

Comments
 (0)