MCPcopy
hub / github.com/django/django / test_localized_priority

Method test_localized_priority

tests/sitemaps_tests/test_http.py:247–254  ·  view source on GitHub ↗

The priority value should not be localized.

(self)

Source from the content-addressed store, hash-verified

245 self.assertContains(response, "<lastmod>2013-03-13T10:00:00-05:00</lastmod>")
246
247 def test_localized_priority(self):
248 """The priority value should not be localized."""
249 with translation.override("fr"):
250 self.assertEqual("0,3", localize(0.3))
251 # Priorities aren't rendered in localized format.
252 response = self.client.get("/simple/sitemap.xml")
253 self.assertContains(response, "<priority>0.5</priority>")
254 self.assertContains(response, "<lastmod>%s</lastmod>" % date.today())
255
256 @modify_settings(INSTALLED_APPS={"remove": "django.contrib.sites"})
257 def test_requestsite_sitemap(self):

Callers

nothing calls this directly

Calls 3

localizeFunction · 0.90
assertContainsMethod · 0.80
getMethod · 0.45

Tested by

no test coverage detected