Skip to content

Commit 890e655

Browse files
committed
Fix SearchIndex tests to account for worker IDs in prefixes
1 parent 52d8df6 commit 890e655

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

tests/integration/test_async_search_index.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ def test_search_index_properties(index_schema, async_index):
7575
def test_search_index_from_yaml(async_index_from_yaml):
7676
assert async_index_from_yaml.name == "json-test"
7777
assert async_index_from_yaml.client is None
78-
assert async_index_from_yaml.prefix == "json"
78+
assert async_index_from_yaml.prefix.startswith("json")
7979
assert async_index_from_yaml.key_separator == ":"
8080
assert async_index_from_yaml.storage_type == StorageType.JSON
8181
assert async_index_from_yaml.key("foo").startswith(async_index_from_yaml.prefix)
@@ -84,7 +84,7 @@ def test_search_index_from_yaml(async_index_from_yaml):
8484
def test_search_index_from_dict(async_index_from_dict):
8585
assert async_index_from_dict.name == "my_index"
8686
assert async_index_from_dict.client is None
87-
assert async_index_from_dict.prefix == "rvl"
87+
assert async_index_from_dict.prefix.startswith("rvl")
8888
assert async_index_from_dict.key_separator == ":"
8989
assert async_index_from_dict.storage_type == StorageType.HASH
9090
assert len(async_index_from_dict.schema.fields) == len(fields)

tests/integration/test_search_index.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ def test_search_index_properties(index_schema, index):
8383
def test_search_index_from_yaml(index_from_yaml):
8484
assert index_from_yaml.name == "json-test"
8585
assert index_from_yaml.client == None
86-
assert index_from_yaml.prefix == "json"
86+
assert index_from_yaml.prefix.startswith("json")
8787
assert index_from_yaml.key_separator == ":"
8888
assert index_from_yaml.storage_type == StorageType.JSON
8989
assert index_from_yaml.key("foo").startswith(index_from_yaml.prefix)
@@ -92,7 +92,7 @@ def test_search_index_from_yaml(index_from_yaml):
9292
def test_search_index_from_dict(index_from_dict):
9393
assert index_from_dict.name == "my_index"
9494
assert index_from_dict.client == None
95-
assert index_from_dict.prefix == "rvl"
95+
assert index_from_dict.prefix.startswith("rvl")
9696
assert index_from_dict.key_separator == ":"
9797
assert index_from_dict.storage_type == StorageType.HASH
9898
assert len(index_from_dict.schema.fields) == len(fields)

0 commit comments

Comments
 (0)