              self.assertEqual(reverse('prefixed'), '/nl/prefixed/')
  
      @override_settings(ROOT_URLCONF='i18n.patterns.urls.wrong')
      def test_invalid_prefix_use(self):
          self.assertRaises(ImproperlyConfigured, lambda: reverse('account:register'))
  
  
  @override_settings(ROOT_URLCONF='i18n.patterns.urls.disabled')
  class URLDisabledTests(URLTestCaseBase):
  
 
</s> remove         self.assertRaises(ImproperlyConfigured, lambda: ops.spatial_version)
 </s> add         with self.assertRaises(ImproperlyConfigured):
            ops.spatial_version </s> remove         self.assertRaises(NotImplementedError, lambda: A().do)
 </s> add         with self.assertRaises(NotImplementedError):
            A().do </s> remove         self.assertRaises(ImproperlyConfigured, self.client.get, '/test/me/')
 </s> add         with self.assertRaises(ImproperlyConfigured):
            self.client.get('/test/me/') </s> remove             self.assertRaises(Exception, lambda: ops.spatial_version)
 </s> add             with self.assertRaises(Exception):
                ops.spatial_version </s> remove         self.assertRaises(ImproperlyConfigured, self.user.has_perm, ('perm', TestObj(),))
 </s> add         with self.assertRaises(ImproperlyConfigured):
            self.user.has_perm(('perm', TestObj()))
        with self.assertRaises(ImproperlyConfigured):
            reverse('account:register')
              self.assertEqual(reverse('prefixed'), '/nl/prefixed/')
  
      @override_settings(ROOT_URLCONF='i18n.patterns.urls.wrong')
      def test_invalid_prefix_use(self):
        with self.assertRaises(ImproperlyConfigured):
            reverse('account:register')
  
  
  @override_settings(ROOT_URLCONF='i18n.patterns.urls.disabled')
  class URLDisabledTests(URLTestCaseBase):
  
keep keep keep keep replace keep keep keep keep keep
 Refs #26022 -- Used context manager version of assertRaises in tests. 
tests/i18n/patterns/tests.py