mirror of
https://github.com/django/django.git
synced 2025-08-04 10:59:45 +00:00
Refs #23919 -- Replaced super(ClassName, self) with super().
This commit is contained in:
parent
dc165ec8e5
commit
d6eaf7c018
339 changed files with 1221 additions and 1296 deletions
|
@ -29,11 +29,11 @@ class LiveServerBase(StaticLiveServerTestCase):
|
|||
# Override settings
|
||||
cls.settings_override = override_settings(**TEST_SETTINGS)
|
||||
cls.settings_override.enable()
|
||||
super(LiveServerBase, cls).setUpClass()
|
||||
super().setUpClass()
|
||||
|
||||
@classmethod
|
||||
def tearDownClass(cls):
|
||||
super(LiveServerBase, cls).tearDownClass()
|
||||
super().tearDownClass()
|
||||
# Restore original settings
|
||||
cls.settings_override.disable()
|
||||
|
||||
|
@ -57,14 +57,14 @@ class StaticLiveServerChecks(LiveServerBase):
|
|||
@classmethod
|
||||
def raises_exception(cls):
|
||||
try:
|
||||
super(StaticLiveServerChecks, cls).setUpClass()
|
||||
super().setUpClass()
|
||||
raise Exception("The line above should have raised an exception")
|
||||
except ImproperlyConfigured:
|
||||
# This raises ImproperlyConfigured("You're using the staticfiles
|
||||
# app without having set the required STATIC_URL setting.")
|
||||
pass
|
||||
finally:
|
||||
super(StaticLiveServerChecks, cls).tearDownClass()
|
||||
super().tearDownClass()
|
||||
|
||||
def test_test_test(self):
|
||||
# Intentionally empty method so that the test is picked up by the
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue