Skip to content

Commit 03629ae

Browse files
committed
Add directConnection in testing settings
1 parent d4b4b44 commit 03629ae

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

.github/workflows/mongodb_settings.py

+2
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,12 @@
1717
"default": {
1818
"ENGINE": "django_mongodb_backend",
1919
"NAME": "djangotests",
20+
"OPTIONS": {"directConnection": True},
2021
},
2122
"other": {
2223
"ENGINE": "django_mongodb_backend",
2324
"NAME": "djangotests-other",
25+
"OPTIONS": {"directConnection": True},
2426
},
2527
}
2628

django_mongodb_backend/base.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -208,7 +208,7 @@ def get_connection_params(self):
208208

209209
@async_unsafe
210210
def get_new_connection(self, conn_params):
211-
return MongoClient(**conn_params, directConnection=True, driver=self._driver_info())
211+
return MongoClient(**conn_params, driver=self._driver_info())
212212

213213
def _driver_info(self):
214214
if not os.environ.get("RUNNING_DJANGOS_TEST_SUITE"):

0 commit comments

Comments
 (0)