fix: fallback parsing of metadata in delete test
This commit is contained in:
parent
9315f3feb5
commit
07c28c015a
1 changed files with 4 additions and 2 deletions
|
|
@ -248,7 +248,8 @@ async def main(mock_create_structured_output: AsyncMock):
|
||||||
|
|
||||||
for node in initial_nodes:
|
for node in initial_nodes:
|
||||||
node_data = node[1]
|
node_data = node[1]
|
||||||
node_metadata = json.loads(node_data["metadata"])
|
node_metadata = node_data["metadata"]
|
||||||
|
node_metadata = json.loads(node_metadata) if type(node_metadata) == str else node_metadata
|
||||||
collection_name = node_data["type"] + "_" + node_metadata["index_fields"][0]
|
collection_name = node_data["type"] + "_" + node_metadata["index_fields"][0]
|
||||||
if collection_name not in initial_nodes_by_vector_collection:
|
if collection_name not in initial_nodes_by_vector_collection:
|
||||||
initial_nodes_by_vector_collection[collection_name] = []
|
initial_nodes_by_vector_collection[collection_name] = []
|
||||||
|
|
@ -271,7 +272,8 @@ async def main(mock_create_structured_output: AsyncMock):
|
||||||
after_delete_nodes_by_vector_collection = {}
|
after_delete_nodes_by_vector_collection = {}
|
||||||
for node in initial_nodes:
|
for node in initial_nodes:
|
||||||
node_data = node[1]
|
node_data = node[1]
|
||||||
node_metadata = json.loads(node_data["metadata"])
|
node_metadata = node_data["metadata"]
|
||||||
|
node_metadata = json.loads(node_metadata) if type(node_metadata) == str else node_metadata
|
||||||
collection_name = node_data["type"] + "_" + node_metadata["index_fields"][0]
|
collection_name = node_data["type"] + "_" + node_metadata["index_fields"][0]
|
||||||
if collection_name not in after_delete_nodes_by_vector_collection:
|
if collection_name not in after_delete_nodes_by_vector_collection:
|
||||||
after_delete_nodes_by_vector_collection[collection_name] = []
|
after_delete_nodes_by_vector_collection[collection_name] = []
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue