Skip to content

Commit 8eefb21

Browse files
committed
Adjusted super() call in URLPatternsTestCase.setUpClass()
Failed after django/django@faba5b7 unless super() call is first. Thanks to Mariusz Felisiak and Tom Christie for review.
1 parent f651878 commit 8eefb21

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

rest_framework/test.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -375,6 +375,8 @@ def test_something_else(self):
375375
"""
376376
@classmethod
377377
def setUpClass(cls):
378+
super().setUpClass()
379+
378380
# Get the module of the TestCase subclass
379381
cls._module = import_module(cls.__module__)
380382
cls._override = override_settings(ROOT_URLCONF=cls.__module__)
@@ -385,7 +387,6 @@ def setUpClass(cls):
385387
cls._module.urlpatterns = cls.urlpatterns
386388

387389
cls._override.enable()
388-
super().setUpClass()
389390

390391
@classmethod
391392
def tearDownClass(cls):

0 commit comments

Comments
 (0)