#14833 closed (fixed)
Sitemaps tests fail if run from your project and USE_I18N is False
Reported by: | Julien Phalip | Owned by: | nobody |
---|---|---|---|
Component: | Contrib apps | Version: | 1.2 |
Severity: | Keywords: | sprintdec2010 | |
Cc: | Triage Stage: | Unreviewed | |
Has patch: | yes | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | no | UI/UX: | no |
Description
Here's what you get:
FAIL: test_localized_priority (django.contrib.sitemaps.tests.basic.SitemapTests) The priority value should not be localized (Refs #14164) ---------------------------------------------------------------------- Traceback (most recent call last): File "/Users/julien/.virtualenvs/djangotests/src/django/django/contrib/sitemaps/tests/basic.py", line 45, in test_localized_priority self.assertEqual(u'0,3', localize(0.3)) AssertionError: u'0,3' != u'0.3' - 0,3+ 0.3
Turning USE_I18N
to True in setUp()
doesn't work because it's already too late: the translations methods have already been loaded by then based on the project's settings. As discussed with Russ, the solution here is to simply skip the test.
Attachments (1)
Change History (4)
by , 14 years ago
Attachment: | 14833_skip_sitemap_test.diff added |
---|
comment:1 by , 14 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
comment:2 by , 14 years ago
Note:
See TracTickets
for help on using tickets.
(In [14826]) Fixed #14833 -- Skip the sitemaps localization test if i18n isn't enabled. Thanks to Julien Phalip for the report and patch.