          self.assertRaises(NoReverseMatch, reverse, 'urlobject-view', kwargs={'arg1': 42, 'arg2': 37})
  
      def test_ambiguous_urlpattern(self):
          "Names deployed via dynamic URL objects that require namespaces can't be resolved"
          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})
  
      def test_non_existent_namespace(self):
          "Non-existent namespaces raise errors"
          self.assertRaises(NoReverseMatch, reverse, 'blahblah:urlobject-view')
          self.assertRaises(NoReverseMatch, reverse, 'test-ns1:blahblah:urlobject-view')
 
</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(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, None)
 </s> add         with self.assertRaises(NoReverseMatch):
            reverse(None) </s> remove             self.assertRaises(NoReverseMatch, lambda: reverse('second'))
 </s> add             with self.assertRaises(NoReverseMatch):
                reverse('second') </s> remove         self.assertRaises(NoReverseMatch, lambda: reverse('first'))
        self.assertRaises(NoReverseMatch, lambda: reverse('second'))
 </s> add         with self.assertRaises(NoReverseMatch):
            reverse('first')
        with self.assertRaises(NoReverseMatch):
            reverse('second')
        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})
          self.assertRaises(NoReverseMatch, reverse, 'urlobject-view', kwargs={'arg1': 42, 'arg2': 37})
  
      def test_ambiguous_urlpattern(self):
          "Names deployed via dynamic URL objects that require namespaces can't be resolved"
        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})
        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})
        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})
  
      def test_non_existent_namespace(self):
          "Non-existent namespaces raise errors"
          self.assertRaises(NoReverseMatch, reverse, 'blahblah:urlobject-view')
          self.assertRaises(NoReverseMatch, reverse, 'test-ns1:blahblah:urlobject-view')
keep keep keep keep replace replace replace keep keep keep keep keep
 Refs #26022 -- Used context manager version of assertRaises in tests. 
tests/urlpatterns_reverse/tests.py