Skip to content

Commit

Permalink
lint
Browse files Browse the repository at this point in the history
  • Loading branch information
blink1073 committed Dec 17, 2024
1 parent 19a8c81 commit 9e77014
Showing 1 changed file with 7 additions and 10 deletions.
17 changes: 7 additions & 10 deletions libs/langchain-mongodb/tests/integration_tests/test_indexes.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

import pytest
import pytest_asyncio
from pymongo import MongoClient

from langchain_mongodb.indexes import MongoDBRecordManager

Expand All @@ -16,22 +17,18 @@
@pytest.fixture
def manager() -> MongoDBRecordManager:
"""Initialize the test MongoDB and yield the DocumentManager instance."""
document_manager = MongoDBRecordManager(
connection_string=CONNECTION_STRING,
db_name=DB_NAME,
collection_name=COLLECTION_NAME,
)
client = MongoClient(CONNECTION_STRING)
collection = client[DB_NAME][COLLECTION_NAME]
document_manager = MongoDBRecordManager(collection=collection)
return document_manager


@pytest_asyncio.fixture
async def amanager() -> MongoDBRecordManager:
"""Initialize the test MongoDB and yield the DocumentManager instance."""
document_manager = MongoDBRecordManager(
connection_string=CONNECTION_STRING,
db_name=DB_NAME,
collection_name=COLLECTION_NAME,
)
client = MongoClient(CONNECTION_STRING)
collection = client[DB_NAME][COLLECTION_NAME]
document_manager = MongoDBRecordManager(collection=collection)
return document_manager


Expand Down

0 comments on commit 9e77014

Please sign in to comment.