Skip to content

Commit d067a74

Browse files
committed
ruff fix
1 parent 07fe056 commit d067a74

1 file changed

Lines changed: 5 additions & 19 deletions

File tree

integrations/weaviate/tests/test_document_store.py

Lines changed: 5 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -14,13 +14,13 @@
1414
from haystack.dataclasses.document import Document
1515
from haystack.document_stores.errors import DocumentStoreError
1616
from haystack.testing.document_store import (
17-
DocumentStoreBaseExtendedTests,
18-
create_filterable_docs,
1917
CountDocumentsByFilterTest,
2018
CountUniqueMetadataByFilterTest,
21-
GetMetadataFieldsInfoTest,
19+
DocumentStoreBaseExtendedTests,
2220
GetMetadataFieldMinMaxTest,
21+
GetMetadataFieldsInfoTest,
2322
GetMetadataFieldUniqueValuesTest,
23+
create_filterable_docs,
2424
)
2525
from haystack.utils.auth import Secret
2626
from numpy import array as np_array
@@ -947,20 +947,6 @@ def test_count_unique_metadata_by_filter_field_not_found(self, document_store):
947947
metadata_fields=["nonexistent_field"],
948948
)
949949

950-
def test_get_metadata_field_unique_values(self, document_store):
951-
docs = [
952-
Document(content="Doc 1", meta={"category": "TypeA"}),
953-
Document(content="Doc 2", meta={"category": "TypeB"}),
954-
Document(content="Doc 3", meta={"category": "TypeA"}),
955-
Document(content="Doc 4", meta={"category": "TypeC"}),
956-
Document(content="Doc 5", meta={"category": "TypeB"}),
957-
]
958-
document_store.write_documents(docs)
959-
960-
values, total_count = document_store.get_metadata_field_unique_values("category")
961-
assert total_count == 3
962-
assert set(values) == {"TypeA", "TypeB", "TypeC"}
963-
964950
def test_get_metadata_field_unique_values_with_meta_prefix(self, document_store):
965951
docs = [
966952
Document(content="Doc 1", meta={"category": "TypeA"}),
@@ -1114,8 +1100,8 @@ def test_get_metadata_field_min_max_empty_collection(document_store):
11141100
# "number" which IS declared in the fixture's collection_settings.
11151101
assert document_store.count_documents() == 0
11161102
result = document_store.get_metadata_field_min_max("number")
1117-
assert result["min"] is 0
1118-
assert result["max"] is 0
1103+
assert result["min"] == 0
1104+
assert result["max"] == 0
11191105

11201106
@staticmethod
11211107
def test_get_metadata_fields_info_empty_collection(document_store):

0 commit comments

Comments
 (0)