mirror of
https://github.com/django/django.git
synced 2025-10-27 23:56:08 +00:00
Fixed #16612 -- Improved has_changed detection for localized field values
Thanks Simon Charette for the review.
This commit is contained in:
@@ -15,7 +15,7 @@ from django.test.utils import override_settings
|
||||
from django.utils import translation
|
||||
from django.utils.formats import (get_format, date_format, time_format,
|
||||
localize, localize_input, iter_format_modules, get_format_modules,
|
||||
number_format, sanitize_separators)
|
||||
number_format, reset_format_cache, sanitize_separators)
|
||||
from django.utils.importlib import import_module
|
||||
from django.utils.numberformat import format as nformat
|
||||
from django.utils._os import upath
|
||||
@@ -463,6 +463,7 @@ class FormattingTests(TestCase):
|
||||
fr_formats.THOUSAND_SEPARATOR = ''
|
||||
fr_formats.FIRST_DAY_OF_WEEK = 0
|
||||
|
||||
reset_format_cache()
|
||||
with translation.override('fr'):
|
||||
with self.settings(USE_THOUSAND_SEPARATOR=True, THOUSAND_SEPARATOR='!'):
|
||||
self.assertEqual('', get_format('THOUSAND_SEPARATOR'))
|
||||
|
||||
Reference in New Issue
Block a user