mirror of
https://github.com/django/django.git
synced 2025-08-03 18:38:50 +00:00
Fixed #32873 -- Deprecated settings.USE_L10N.
Co-authored-by: Mariusz Felisiak <felisiak.mariusz@gmail.com>
This commit is contained in:
parent
04e023e383
commit
676bd084f2
48 changed files with 335 additions and 148 deletions
|
@ -201,7 +201,7 @@ class UtilsTests(SimpleTestCase):
|
|||
display_value = display_for_field(12345, models.IntegerField(), self.empty_value)
|
||||
self.assertEqual(display_value, '12345')
|
||||
|
||||
@override_settings(USE_L10N=True, USE_THOUSAND_SEPARATOR=True)
|
||||
@override_settings(USE_THOUSAND_SEPARATOR=True)
|
||||
def test_number_formats_with_thousand_separator_display_for_field(self):
|
||||
display_value = display_for_field(12345.6789, models.FloatField(), self.empty_value)
|
||||
self.assertEqual(display_value, '12,345.6789')
|
||||
|
@ -219,7 +219,7 @@ class UtilsTests(SimpleTestCase):
|
|||
display_value = display_for_value([1, 2, 'buckle', 'my', 'shoe'], self.empty_value)
|
||||
self.assertEqual(display_value, '1, 2, buckle, my, shoe')
|
||||
|
||||
@override_settings(USE_L10N=True, USE_THOUSAND_SEPARATOR=True)
|
||||
@override_settings(USE_THOUSAND_SEPARATOR=True)
|
||||
def test_list_display_for_value_boolean(self):
|
||||
self.assertEqual(
|
||||
display_for_value(True, '', boolean=True),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue