Skip to content

Commit

Permalink
black
Browse files Browse the repository at this point in the history
  • Loading branch information
ZanSara committed Feb 15, 2024
1 parent bb6e4ba commit 8874688
Showing 1 changed file with 16 additions and 13 deletions.
29 changes: 16 additions & 13 deletions integrations/mongodb_atlas/tests/test_document_store.py
Original file line number Diff line number Diff line change
Expand Up @@ -75,20 +75,23 @@ def test_to_dict(self, _):

@patch("haystack_integrations.document_stores.mongodb_atlas.document_store.MongoClient")
def test_from_dict(self, _):
docstore = MongoDBAtlasDocumentStore.from_dict({
"type": "haystack_integrations.document_stores.mongodb_atlas.document_store.MongoDBAtlasDocumentStore",
"init_parameters": {
"mongo_connection_string": {
"env_vars": [
"MONGO_CONNECTION_STRING",
],
"strict": True,
"type": "env_var",
docstore = MongoDBAtlasDocumentStore.from_dict(
{
"type": "haystack_integrations.document_stores.mongodb_atlas.document_store.MongoDBAtlasDocumentStore",
"init_parameters": {
"mongo_connection_string": {
"env_vars": [
"MONGO_CONNECTION_STRING",
],
"strict": True,
"type": "env_var",
},
"database_name": "database_name",
"collection_name": "collection_name",
"recreate_collection": True,
},
"database_name": "database_name",
"collection_name": "collection_name",
"recreate_collection": True,
}})
}
)
assert docstore.mongo_connection_string == Secret.from_env_var("MONGO_CONNECTION_STRING")
assert docstore.database_name == "database_name"
assert docstore.collection_name == "collection_name"
Expand Down

0 comments on commit 8874688

Please sign in to comment.