From 4efe1b79e9462318ff8b2c76a09c5925ad0e0f7c Mon Sep 17 00:00:00 2001 From: Tim Graham Date: Mon, 15 Dec 2014 19:15:26 -0500 Subject: [PATCH] Refs #23884 -- Silenced a deprecation warning in sitemaps tests. --- django/contrib/sitemaps/tests/test_flatpages.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/django/contrib/sitemaps/tests/test_flatpages.py b/django/contrib/sitemaps/tests/test_flatpages.py index 71949ae4d0..1d6f58e77e 100644 --- a/django/contrib/sitemaps/tests/test_flatpages.py +++ b/django/contrib/sitemaps/tests/test_flatpages.py @@ -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, '%s%s' % (self.base_url, public.url)) # Private flatpage should not be in the sitemap