  class NoRootUrlConfTests(SimpleTestCase):
      """Tests for handler404 and handler500 if ROOT_URLCONF is None"""
  
      def test_no_handler_exception(self):
          self.assertRaises(ImproperlyConfigured, self.client.get, '/test/me/')
  
  
  @override_settings(ROOT_URLCONF='urlpatterns_reverse.namespace_urls')
  class ResolverMatchTests(SimpleTestCase):
  
 
</s> remove         self.assertRaises(ImproperlyConfigured,
                          self.client.get,
                          '/syndication/articles/')
 </s> add         with self.assertRaises(ImproperlyConfigured):
            self.client.get('/syndication/articles/') </s> remove         self.assertRaises(NoReverseMatch, redirect, absolute_kwargs_view, wrong_argument=None)
 </s> add         with self.assertRaises(NoReverseMatch):
            redirect(absolute_kwargs_view, wrong_argument=None) </s> remove         self.assertRaises(ImproperlyConfigured, lambda: reverse('account:register'))
 </s> add         with self.assertRaises(ImproperlyConfigured):
            reverse('account:register') </s> remove         self.assertRaises(AttributeError, self.client.get, '/detail/author/invalid/url/')
 </s> add         with self.assertRaises(AttributeError):
            self.client.get('/detail/author/invalid/url/') </s> remove         self.assertRaises(ImproperlyConfigured, self.client.get, '/detail/author/invalid/qs/')
 </s> add         with self.assertRaises(ImproperlyConfigured):
            self.client.get('/detail/author/invalid/qs/')
        with self.assertRaises(ImproperlyConfigured):
            self.client.get('/test/me/')
  class NoRootUrlConfTests(SimpleTestCase):
      """Tests for handler404 and handler500 if ROOT_URLCONF is None"""
  
      def test_no_handler_exception(self):
        with self.assertRaises(ImproperlyConfigured):
            self.client.get('/test/me/')
  
  
  @override_settings(ROOT_URLCONF='urlpatterns_reverse.namespace_urls')
  class ResolverMatchTests(SimpleTestCase):
  
keep keep keep keep replace keep keep keep keep keep
 Refs #26022 -- Used context manager version of assertRaises in tests. 
tests/urlpatterns_reverse/tests.py