summaryrefslogtreecommitdiff
path: root/django
diff options
context:
space:
mode:
authorChris Jerdonek <chris.jerdonek@gmail.com>2021-02-11 05:43:36 -0800
committerMariusz Felisiak <felisiak.mariusz@gmail.com>2021-02-12 09:39:48 +0100
commit694deff82f86e025561dfa724425f67e2ff7cbb7 (patch)
tree2a47c00ab27de75b5152aa3b28d72fc168dc6d40 /django
parente412b288455dd3ea6f1d65c8ec5d01751e489976 (diff)
Fixed #32437 -- Fixed cleaning up ALLOWED_HOSTS in LiveServerTestCase on setUpClass() failure.
Diffstat (limited to 'django')
-rw-r--r--django/test/testcases.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/django/test/testcases.py b/django/test/testcases.py
index d064b47e9b..dfa4f41fb5 100644
--- a/django/test/testcases.py
+++ b/django/test/testcases.py
@@ -1573,11 +1573,12 @@ class LiveServerTestCase(TransactionTestCase):
for conn in cls.server_thread.connections_override.values():
conn.dec_thread_sharing()
+ cls._live_server_modified_settings.disable()
+ super().tearDownClass()
+
@classmethod
def tearDownClass(cls):
cls._tearDownClassInternal()
- cls._live_server_modified_settings.disable()
- super().tearDownClass()
class SerializeMixin: