MCPcopy
hub / github.com/django/django / test_simple_sitemap_index

Method test_simple_sitemap_index

tests/sitemaps_tests/test_http.py:21–32  ·  view source on GitHub ↗

A simple sitemap index can be rendered

(self)

Source from the content-addressed store, hash-verified

19 )
20
21 def test_simple_sitemap_index(self):
22 "A simple sitemap index can be rendered"
23 response = self.client.get("/simple/index.xml")
24 expected_content = """<?xml version="1.0" encoding="UTF-8"?>
25<sitemapindex xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
26<sitemap><loc>%s/simple/sitemap-simple.xml</loc><lastmod>%s</lastmod></sitemap>
27</sitemapindex>
28""" % (
29 self.base_url,
30 date.today(),
31 )
32 self.assertXMLEqual(response.text, expected_content)
33
34 def test_sitemap_not_callable(self):
35 """A sitemap may not be callable."""

Callers

nothing calls this directly

Calls 2

assertXMLEqualMethod · 0.80
getMethod · 0.45

Tested by

no test coverage detected