From 5f637a8a8d847ba02493c5ce6da55e378c3f588f Mon Sep 17 00:00:00 2001 From: Mariusz Felisiak Date: Mon, 19 Feb 2024 18:34:18 +0100 Subject: Fixed #35226 -- Reallowed executing queries for dynamically created connections. Regression in 8fb0be3500cc7519a56985b1b6f415d75ac6fedb. Thanks Florian Apolloner for the report. --- django/test/testcases.py | 2 ++ 1 file changed, 2 insertions(+) (limited to 'django') diff --git a/django/test/testcases.py b/django/test/testcases.py index 51b07ae50d..bf035bd531 100644 --- a/django/test/testcases.py +++ b/django/test/testcases.py @@ -280,6 +280,8 @@ class SimpleTestCase(unittest.TestCase): self.connection is None and self.alias not in cls.databases and self.alias != NO_DB_ALIAS + # Dynamically created connections are always allowed. + and self.alias in connections ): # Connection has not yet been established, but the alias is not allowed. message = cls._disallowed_database_msg % { -- cgit v1.3