diff options
| author | Tim Graham <timograham@gmail.com> | 2014-06-20 17:53:18 -0400 |
|---|---|---|
| committer | Tim Graham <timograham@gmail.com> | 2014-06-20 17:53:18 -0400 |
| commit | 3425d42bf1945a3e6b2562de6c71a614e6ab2845 (patch) | |
| tree | 27fdfcc5dcacccf199c341e321d85ee1f02b7549 | |
| parent | 2764146586509c2c81ad14da4ac86efa3a949308 (diff) | |
Fixed test from refs #22782.
| -rw-r--r-- | django/contrib/sitemaps/tests/base.py | 2 | ||||
| -rw-r--r-- | django/contrib/sitemaps/tests/test_http.py | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/django/contrib/sitemaps/tests/base.py b/django/contrib/sitemaps/tests/base.py index 54446b3012..a218e60c3e 100644 --- a/django/contrib/sitemaps/tests/base.py +++ b/django/contrib/sitemaps/tests/base.py @@ -39,4 +39,4 @@ class SitemapTestsBase(TestCase): cache.clear() # Create an object for sitemap content. TestModel.objects.create(name='Test Object') - I18nTestModel.objects.create(name='Test Object') + self.i18n_model = I18nTestModel.objects.create(name='Test Object') diff --git a/django/contrib/sitemaps/tests/test_http.py b/django/contrib/sitemaps/tests/test_http.py index bce276d2ea..c3c5767d49 100644 --- a/django/contrib/sitemaps/tests/test_http.py +++ b/django/contrib/sitemaps/tests/test_http.py @@ -178,7 +178,7 @@ class HTTPSitemapTests(SitemapTestsBase): response = self.client.get('/simple/i18n.xml') expected_content = """<?xml version="1.0" encoding="UTF-8"?> <urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9"> -<url><loc>{0}/en/i18n/testmodel/1/</loc><changefreq>never</changefreq><priority>0.5</priority></url><url><loc>{0}/pt/i18n/testmodel/1/</loc><changefreq>never</changefreq><priority>0.5</priority></url> +<url><loc>{0}/en/i18n/testmodel/{1}/</loc><changefreq>never</changefreq><priority>0.5</priority></url><url><loc>{0}/pt/i18n/testmodel/{1}/</loc><changefreq>never</changefreq><priority>0.5</priority></url> </urlset> -""".format(self.base_url) +""".format(self.base_url, self.i18n_model.pk) self.assertXMLEqual(response.content.decode('utf-8'), expected_content) |
