1
0
mirror of https://github.com/django/django.git synced 2025-10-31 09:41:08 +00:00

Fixed isolation of i18n.tests.FormattingTests.test_get_custom_format().

This commit is contained in:
Mariusz Felisiak
2021-04-22 19:57:27 +02:00
committed by GitHub
parent 90916f050c
commit ac2e6e6869

View File

@@ -1254,6 +1254,7 @@ class FormattingTests(SimpleTestCase):
self.assertEqual(get_format('DEBUG'), 'DEBUG') self.assertEqual(get_format('DEBUG'), 'DEBUG')
def test_get_custom_format(self): def test_get_custom_format(self):
reset_format_cache()
with self.settings(FORMAT_MODULE_PATH='i18n.other.locale'): with self.settings(FORMAT_MODULE_PATH='i18n.other.locale'):
with translation.override('fr', deactivate=True): with translation.override('fr', deactivate=True):
self.assertEqual('d/m/Y CUSTOM', get_format('CUSTOM_DAY_FORMAT')) self.assertEqual('d/m/Y CUSTOM', get_format('CUSTOM_DAY_FORMAT'))