diff --git a/python/tests/unit/test_mongodb_atlas_collection.py b/python/tests/unit/connectors/memory/mongodb_atlas/test_mongodb_atlas_collection.py similarity index 94% rename from python/tests/unit/test_mongodb_atlas_collection.py rename to python/tests/unit/connectors/memory/mongodb_atlas/test_mongodb_atlas_collection.py index d7ba6c93a382..65cb026beb36 100644 --- a/python/tests/unit/test_mongodb_atlas_collection.py +++ b/python/tests/unit/connectors/memory/mongodb_atlas/test_mongodb_atlas_collection.py @@ -1,15 +1,16 @@ # Copyright (c) Microsoft. All rights reserved. -import pytest from unittest.mock import MagicMock, patch + +import pytest from pymongo import MongoClient + from semantic_kernel.connectors.memory.mongodb_atlas.mongodb_atlas_collection import MongoDBAtlasCollection -from semantic_kernel.data.record_definition import VectorStoreRecordDefinition @pytest.fixture def mock_mongo_client(): - with patch("pymongo.MongoClient") as mock: + with patch("pymongo.AsyncMongoClient") as mock: yield mock diff --git a/python/tests/unit/test_mongodb_atlas_store.py b/python/tests/unit/connectors/memory/mongodb_atlas/test_mongodb_atlas_store.py similarity index 96% rename from python/tests/unit/test_mongodb_atlas_store.py rename to python/tests/unit/connectors/memory/mongodb_atlas/test_mongodb_atlas_store.py index 180a1672f371..2de12985ac97 100644 --- a/python/tests/unit/test_mongodb_atlas_store.py +++ b/python/tests/unit/connectors/memory/mongodb_atlas/test_mongodb_atlas_store.py @@ -1,16 +1,18 @@ # Copyright (c) Microsoft. All rights reserved. -import pytest from unittest.mock import MagicMock, patch + +import pytest from pymongo import MongoClient -from semantic_kernel.connectors.memory.mongodb_atlas.mongodb_atlas_store import MongoDBAtlasStore + from semantic_kernel.connectors.memory.mongodb_atlas.mongodb_atlas_collection import MongoDBAtlasCollection +from semantic_kernel.connectors.memory.mongodb_atlas.mongodb_atlas_store import MongoDBAtlasStore from semantic_kernel.data.record_definition import VectorStoreRecordDefinition @pytest.fixture def mock_mongo_client(): - with patch("pymongo.MongoClient") as mock: + with patch("pymongo.AsyncMongoClient") as mock: yield mock