1
0
mirror of https://github.com/django/django.git synced 2024-12-22 17:16:24 +00:00

Refs #23884 -- Silenced a deprecation warning in sitemaps tests.

This commit is contained in:
Tim Graham 2014-12-15 19:15:26 -05:00
parent c17d821fa7
commit 4efe1b79e9

View File

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