Fixed test from refs #22782.

This commit is contained in:
Tim Graham 2014-06-20 17:53:18 -04:00
parent 2764146586
commit 3425d42bf1
2 changed files with 3 additions and 3 deletions

View File

@ -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')

View File

@ -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)