mirror of
https://github.com/django/django.git
synced 2025-10-31 09:41:08 +00:00
Refs #23919 -- Replaced super(ClassName, self) with super().
This commit is contained in:
@@ -70,7 +70,7 @@ class MultipleLocaleCompilationTests(MessageCompilationTests):
|
||||
MO_FILE_FR = None
|
||||
|
||||
def setUp(self):
|
||||
super(MultipleLocaleCompilationTests, self).setUp()
|
||||
super().setUp()
|
||||
localedir = os.path.join(self.test_dir, 'locale')
|
||||
self.MO_FILE_HR = os.path.join(localedir, 'hr/LC_MESSAGES/django.mo')
|
||||
self.MO_FILE_FR = os.path.join(localedir, 'fr/LC_MESSAGES/django.mo')
|
||||
@@ -96,7 +96,7 @@ class ExcludedLocaleCompilationTests(MessageCompilationTests):
|
||||
MO_FILE = 'locale/%s/LC_MESSAGES/django.mo'
|
||||
|
||||
def setUp(self):
|
||||
super(ExcludedLocaleCompilationTests, self).setUp()
|
||||
super().setUp()
|
||||
copytree('canned_locale', 'locale')
|
||||
|
||||
def test_command_help(self):
|
||||
@@ -160,7 +160,7 @@ class ProjectAndAppTests(MessageCompilationTests):
|
||||
class FuzzyTranslationTest(ProjectAndAppTests):
|
||||
|
||||
def setUp(self):
|
||||
super(FuzzyTranslationTest, self).setUp()
|
||||
super().setUp()
|
||||
gettext_module._translations = {} # flush cache or test will be useless
|
||||
|
||||
def test_nofuzzy_compiling(self):
|
||||
|
||||
@@ -468,7 +468,7 @@ class IgnoredExtractorTests(ExtractorTests):
|
||||
class SymlinkExtractorTests(ExtractorTests):
|
||||
|
||||
def setUp(self):
|
||||
super(SymlinkExtractorTests, self).setUp()
|
||||
super().setUp()
|
||||
self.symlinked_dir = os.path.join(self.test_dir, 'templates_symlinked')
|
||||
|
||||
def test_symlink(self):
|
||||
@@ -632,7 +632,7 @@ class ExcludedLocaleExtractionTests(ExtractorTests):
|
||||
os.utime(self.PO_FILE % locale, (0, 0))
|
||||
|
||||
def setUp(self):
|
||||
super(ExcludedLocaleExtractionTests, self).setUp()
|
||||
super().setUp()
|
||||
copytree('canned_locale', 'locale')
|
||||
self._set_times_for_all_po_files()
|
||||
|
||||
|
||||
@@ -37,7 +37,7 @@ class ExtractingStringsWithPercentSigns(POFileAssertionMixin, FrenchTestCase):
|
||||
"""
|
||||
|
||||
def setUp(self):
|
||||
super(ExtractingStringsWithPercentSigns, self).setUp()
|
||||
super().setUp()
|
||||
with open(self.PO_FILE, 'r') as fp:
|
||||
self.po_contents = fp.read()
|
||||
|
||||
|
||||
@@ -233,7 +233,7 @@ class TranslationThreadSafetyTests(SimpleTestCase):
|
||||
class FormattingTests(SimpleTestCase):
|
||||
|
||||
def setUp(self):
|
||||
super(FormattingTests, self).setUp()
|
||||
super().setUp()
|
||||
self.n = decimal.Decimal('66666.666')
|
||||
self.f = 99999.999
|
||||
self.d = datetime.date(2009, 12, 31)
|
||||
@@ -981,7 +981,7 @@ class FormattingTests(SimpleTestCase):
|
||||
class MiscTests(SimpleTestCase):
|
||||
|
||||
def setUp(self):
|
||||
super(MiscTests, self).setUp()
|
||||
super().setUp()
|
||||
self.rf = RequestFactory()
|
||||
|
||||
@override_settings(LANGUAGE_CODE='de')
|
||||
@@ -1215,12 +1215,12 @@ class MiscTests(SimpleTestCase):
|
||||
class ResolutionOrderI18NTests(SimpleTestCase):
|
||||
|
||||
def setUp(self):
|
||||
super(ResolutionOrderI18NTests, self).setUp()
|
||||
super().setUp()
|
||||
activate('de')
|
||||
|
||||
def tearDown(self):
|
||||
deactivate()
|
||||
super(ResolutionOrderI18NTests, self).tearDown()
|
||||
super().tearDown()
|
||||
|
||||
def assertUgettext(self, msgid, msgstr):
|
||||
result = ugettext(msgid)
|
||||
@@ -1430,7 +1430,7 @@ class UnprefixedDefaultLanguageTests(SimpleTestCase):
|
||||
class CountrySpecificLanguageTests(SimpleTestCase):
|
||||
|
||||
def setUp(self):
|
||||
super(CountrySpecificLanguageTests, self).setUp()
|
||||
super().setUp()
|
||||
self.rf = RequestFactory()
|
||||
|
||||
def test_check_for_language(self):
|
||||
@@ -1480,12 +1480,12 @@ class CountrySpecificLanguageTests(SimpleTestCase):
|
||||
class TranslationFilesMissing(SimpleTestCase):
|
||||
|
||||
def setUp(self):
|
||||
super(TranslationFilesMissing, self).setUp()
|
||||
super().setUp()
|
||||
self.gettext_find_builtin = gettext_module.find
|
||||
|
||||
def tearDown(self):
|
||||
gettext_module.find = self.gettext_find_builtin
|
||||
super(TranslationFilesMissing, self).tearDown()
|
||||
super().tearDown()
|
||||
|
||||
def patchGettextFind(self):
|
||||
gettext_module.find = lambda *args, **kw: None
|
||||
|
||||
Reference in New Issue
Block a user