mirror of https://github.com/django/django.git
Refs #23884 -- Silenced a deprecation warning in sitemaps tests.
This commit is contained in:
parent
c17d821fa7
commit
4efe1b79e9
|
@ -38,7 +38,9 @@ class FlatpagesSitemapTests(SitemapTestsBase):
|
|||
registration_required=True
|
||||
)
|
||||
private.sites.add(settings.SITE_ID)
|
||||
response = self.client.get('/flatpages/sitemap.xml')
|
||||
with warnings.catch_warnings():
|
||||
warnings.simplefilter('ignore')
|
||||
response = self.client.get('/flatpages/sitemap.xml')
|
||||
# Public flatpage should be in the sitemap
|
||||
self.assertContains(response, '<loc>%s%s</loc>' % (self.base_url, public.url))
|
||||
# Private flatpage should not be in the sitemap
|
||||
|
|
Loading…
Reference in New Issue