chore(api/tests): apply ruff reformat #7590 (#7591)

Co-authored-by: -LAN- <laipz8200@outlook.com>
This commit is contained in:
Bowen Liang
2024-08-23 23:52:25 +08:00
committed by GitHub
parent 2da63654e5
commit b035c02f78
155 changed files with 4279 additions and 5925 deletions

View File

@@ -12,13 +12,13 @@ class PGVectoRSVectorTest(AbstractVectorTest):
self.vector = PGVectoRS(
collection_name=self.collection_name.lower(),
config=PgvectoRSConfig(
host='localhost',
host="localhost",
port=5431,
user='postgres',
password='difyai123456',
database='dify',
user="postgres",
password="difyai123456",
database="dify",
),
dim=128
dim=128,
)
def search_by_full_text(self):
@@ -27,8 +27,9 @@ class PGVectoRSVectorTest(AbstractVectorTest):
assert len(hits_by_full_text) == 0
def get_ids_by_metadata_field(self):
ids = self.vector.get_ids_by_metadata_field(key='document_id', value=self.example_doc_id)
ids = self.vector.get_ids_by_metadata_field(key="document_id", value=self.example_doc_id)
assert len(ids) == 1
def test_pgvecot_rs(setup_mock_redis):
PGVectoRSVectorTest().run_all_tests()