MCPcopy
hub / github.com/django/django / test_sub_locales

Method test_sub_locales

tests/i18n/tests.py:1202–1210  ·  view source on GitHub ↗

Check if sublocales fall back to the main locale

(self)

Source from the content-addressed store, hash-verified

1200 )
1201
1202 def test_sub_locales(self):
1203 """
1204 Check if sublocales fall back to the main locale
1205 """
1206 with self.settings(USE_THOUSAND_SEPARATOR=True):
1207 with translation.override("de-at", deactivate=True):
1208 self.assertEqual("66.666,666", Template("{{ n }}").render(self.ctxt))
1209 with translation.override("es-us", deactivate=True):
1210 self.assertEqual("31 de diciembre de 2009", date_format(self.d))
1211
1212 def test_localized_input(self):
1213 """

Callers

nothing calls this directly

Calls 4

TemplateClass · 0.90
date_formatFunction · 0.90
settingsMethod · 0.45
renderMethod · 0.45

Tested by

no test coverage detected