diff options
| author | Andrew Kuchev <0coming.soon@gmail.com> | 2016-01-25 00:35:46 +0500 |
|---|---|---|
| committer | Tim Graham <timograham@gmail.com> | 2016-01-28 11:20:36 -0500 |
| commit | 5b2e11e574dcc84d3d10efa3ee45c25f97faca5e (patch) | |
| tree | 20723d54a5a13dfe0e312d03f33e421c8193ccad /tests/sitemaps_tests/test_http.py | |
| parent | f05722a08a11b2e6c6c9acdf2bacd6a6128ccbb0 (diff) | |
Refs #26015 -- Added regression test for an empty sitemap.
Diffstat (limited to 'tests/sitemaps_tests/test_http.py')
| -rw-r--r-- | tests/sitemaps_tests/test_http.py | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/tests/sitemaps_tests/test_http.py b/tests/sitemaps_tests/test_http.py index 38a79a03f2..5b3cbb5843 100644 --- a/tests/sitemaps_tests/test_http.py +++ b/tests/sitemaps_tests/test_http.py @@ -232,3 +232,11 @@ class HTTPSitemapTests(SitemapTestsBase): </urlset> """.format(self.base_url, self.i18n_model.pk) self.assertXMLEqual(response.content.decode('utf-8'), expected_content) + + def test_sitemap_without_entries(self): + response = self.client.get('/sitemap-without-entries/sitemap.xml') + expected_content = """<?xml version="1.0" encoding="UTF-8"?> +<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9"> + +</urlset>""" + self.assertXMLEqual(response.content.decode('utf-8'), expected_content) |
