summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Sanders <shang.xiao.sanders@gmail.com>2023-10-23 14:41:34 +1100
committerMariusz Felisiak <felisiak.mariusz@gmail.com>2023-10-23 05:42:39 +0200
commit08aa336af46f30a29577a96588eeb3b440cd6dad (patch)
tree93f73a54bcb276859e7a3af2c1ca1067bdb00e09
parent4dec7eded9e58d7cefe54ea32137599cd4d1ea69 (diff)
[5.0.x] Fixed #34903, Refs #34825 -- Made workers initialization respect empty set of used connections.
Thanks to David Smith for the investigation & patch. Regression in 2128a73713735fb794ca6565fd5d7792293f5cfa. Follow up to a5905b164dbf52e59fa646af9c3d523c0804d86a. Co-authored-by: David Sanders <shang.xiao.sanders@gmail.com> Backport of 68d0159b6dfce07f144045d56639c52066e8b90e from main
-rw-r--r--django/test/runner.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/django/test/runner.py b/django/test/runner.py
index ecd10d5d91..8bb40a3413 100644
--- a/django/test/runner.py
+++ b/django/test/runner.py
@@ -431,7 +431,7 @@ def _init_worker(
django.setup()
setup_test_environment(debug=debug_mode)
- db_aliases = used_aliases or connections
+ db_aliases = used_aliases if used_aliases is not None else connections
for alias in db_aliases:
connection = connections[alias]
if start_method == "spawn":