                  self.assertEqual(got, expected)
  
      def test_reverse_none(self):
          # Reversing None should raise an error, not return the last un-named view.
          self.assertRaises(NoReverseMatch, reverse, None)
  
      @override_script_prefix('/{{invalid}}/')
      def test_prefix_braces(self):
          self.assertEqual(
              '/%7B%7Binvalid%7D%7D/includes/non_path_include/',
 
</s> remove         self.assertRaises(NoReverseMatch, reverse, 'blahblah:urlobject-view')
        self.assertRaises(NoReverseMatch, reverse, 'test-ns1:blahblah:urlobject-view')
 </s> add         with self.assertRaises(NoReverseMatch):
            reverse('blahblah:urlobject-view')
        with self.assertRaises(NoReverseMatch):
            reverse('test-ns1:blahblah:urlobject-view') </s> remove         self.assertRaises(NoReverseMatch, reverse, 'inner-nothing')
        self.assertRaises(NoReverseMatch, reverse, 'inner-nothing', args=[37, 42])
        self.assertRaises(NoReverseMatch, reverse, 'inner-nothing', kwargs={'arg1': 42, 'arg2': 37})
 </s> add         with self.assertRaises(NoReverseMatch):
            reverse('inner-nothing')
        with self.assertRaises(NoReverseMatch):
            reverse('inner-nothing', args=[37, 42])
        with self.assertRaises(NoReverseMatch):
            reverse('inner-nothing', kwargs={'arg1': 42, 'arg2': 37}) </s> remove         self.assertRaises(NoReverseMatch, reverse, 'urlobject-view')
        self.assertRaises(NoReverseMatch, reverse, 'urlobject-view', args=[37, 42])
        self.assertRaises(NoReverseMatch, reverse, 'urlobject-view', kwargs={'arg1': 42, 'arg2': 37})
 </s> add         with self.assertRaises(NoReverseMatch):
            reverse('urlobject-view')
        with self.assertRaises(NoReverseMatch):
            reverse('urlobject-view', args=[37, 42])
        with self.assertRaises(NoReverseMatch):
            reverse('urlobject-view', kwargs={'arg1': 42, 'arg2': 37}) </s> remove         self.assertRaises(ValueError, setattr, p, 'restaurant', None)
 </s> add         with self.assertRaises(ValueError):
            setattr(p, 'restaurant', None) </s> remove             self.assertRaises(
                NotImplementedError,
                City.objects.all().aggregate, MakeLine('point')
            )
 </s> add             with self.assertRaises(NotImplementedError):
                City.objects.all().aggregate(MakeLine('point'))
        with self.assertRaises(NoReverseMatch):
            reverse(None)
                  self.assertEqual(got, expected)
  
      def test_reverse_none(self):
          # Reversing None should raise an error, not return the last un-named view.
        with self.assertRaises(NoReverseMatch):
            reverse(None)
  
      @override_script_prefix('/{{invalid}}/')
      def test_prefix_braces(self):
          self.assertEqual(
              '/%7B%7Binvalid%7D%7D/includes/non_path_include/',
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