Skip to content

Commit ced9efe

Browse files
committed
undo dawg
1 parent 759ec1b commit ced9efe

File tree

1 file changed

+6
-12
lines changed

1 file changed

+6
-12
lines changed

tests/integration/test_query.py

Lines changed: 6 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@
2222
Timestamp,
2323
)
2424
from redisvl.redis.utils import array_to_buffer
25-
from redisvl.utils.utils import create_ulid
2625

2726
# TODO expand to multiple schema types and sync + async
2827

@@ -146,12 +145,11 @@ def sorted_range_query():
146145
@pytest.fixture
147146
def index(sample_data, redis_url):
148147
# construct a search index from the schema
149-
idx = f"user_index_{create_ulid()}"
150148
index = SearchIndex.from_dict(
151149
{
152150
"index": {
153-
"name": idx,
154-
"prefix": idx,
151+
"name": "user_index",
152+
"prefix": "v1",
155153
"storage_type": "hash",
156154
},
157155
"fields": [
@@ -192,20 +190,17 @@ def hash_preprocess(item: dict) -> dict:
192190
yield index
193191

194192
# clean up
195-
index.clear()
196-
index.delete()
193+
index.delete(drop=True)
197194

198195

199196
@pytest.fixture
200197
def L2_index(sample_data, redis_url):
201198
# construct a search index from the schema
202-
idx = f"L2_index_{create_ulid()}"
203-
204199
index = SearchIndex.from_dict(
205200
{
206201
"index": {
207-
"name": idx,
208-
"prefix": idx,
202+
"name": "L2_index",
203+
"prefix": "L2_index",
209204
"storage_type": "hash",
210205
},
211206
"fields": [
@@ -245,8 +240,7 @@ def hash_preprocess(item: dict) -> dict:
245240
yield index
246241

247242
# clean up
248-
index.clear()
249-
index.delete()
243+
index.delete(drop=True)
250244

251245

252246
def test_search_and_query(index):

0 commit comments

Comments
 (0)