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
1 changed files with 3 additions and 1 deletions

View File

@ -38,7 +38,9 @@ class FlatpagesSitemapTests(SitemapTestsBase):
registration_required=True registration_required=True
) )
private.sites.add(settings.SITE_ID) 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 # Public flatpage should be in the sitemap
self.assertContains(response, '<loc>%s%s</loc>' % (self.base_url, public.url)) self.assertContains(response, '<loc>%s%s</loc>' % (self.base_url, public.url))
# Private flatpage should not be in the sitemap # Private flatpage should not be in the sitemap