          Check we get ImproperlyConfigured if we don't pass a site object to
          Sitemap.get_urls and no Site objects exist
          """
          Site.objects.all().delete()
          self.assertRaises(ImproperlyConfigured, Sitemap().get_urls)
  
      @modify_settings(INSTALLED_APPS={'remove': 'django.contrib.sites'})
      def test_sitemap_get_urls_no_site_2(self):
          """
          Check we get ImproperlyConfigured when we don't pass a site object to
 
</s> remove         self.assertRaises(ImproperlyConfigured, Sitemap().get_urls)
 </s> add         with self.assertRaises(ImproperlyConfigured):
            Sitemap().get_urls() </s> remove         self.assertRaises(ObjectDoesNotExist, Site.objects.get_current)
 </s> add         with self.assertRaises(ObjectDoesNotExist):
            Site.objects.get_current() </s> remove         self.assertRaises(Site.DoesNotExist, Site.objects.get_current)
 </s> add         with self.assertRaises(Site.DoesNotExist):
            Site.objects.get_current() </s> remove         self.assertRaises(InvalidSessionKey,
                          self.backend()._key_to_file, "a\\b\\c")
 </s> add         with self.assertRaises(InvalidSessionKey):
            self.backend()._key_to_file("a\\b\\c") </s> remove         self.assertRaises(InvalidSessionKey,
                          self.backend()._key_to_file, "a/b/c")
 </s> add         with self.assertRaises(InvalidSessionKey):
            self.backend()._key_to_file("a/b/c")
        with self.assertRaises(ImproperlyConfigured):
            Sitemap().get_urls()
          Check we get ImproperlyConfigured if we don't pass a site object to
          Sitemap.get_urls and no Site objects exist
          """
          Site.objects.all().delete()
        with self.assertRaises(ImproperlyConfigured):
            Sitemap().get_urls()
  
      @modify_settings(INSTALLED_APPS={'remove': 'django.contrib.sites'})
      def test_sitemap_get_urls_no_site_2(self):
          """
          Check we get ImproperlyConfigured when we don't pass a site object to
keep keep keep keep replace keep keep keep keep keep
 Refs #26022 -- Used context manager version of assertRaises in tests. 
tests/sitemaps_tests/test_http.py