          }
          user_ct = ContentType.objects.get_for_model(FooWithBrokenAbsoluteUrl)
          obj = FooWithBrokenAbsoluteUrl.objects.create(name="john")
  
          self.assertRaises(AttributeError, shortcut, request, user_ct.id, obj.id)
  
      def test_missing_model(self):
          """
          Ensures that displaying content types in admin (or anywhere) doesn't
          break on leftover content type records in the DB for which no model
 
</s> remove         self.assertRaises(Http404, shortcut, request, user_ct.id, obj.id)
 </s> add         with self.assertRaises(Http404):
            shortcut(request, user_ct.id, obj.id) </s> remove         self.assertRaises(ContentNotRenderedError, lambda: response.content)
 </s> add         with self.assertRaises(ContentNotRenderedError):
            response.content </s> remove         self.assertRaises(InvalidPage, paginator.page, 3)
        self.assertRaises(PageNotAnInteger, paginator.validate_number, None)
        self.assertRaises(PageNotAnInteger, paginator.validate_number, 'x')
 </s> add         with self.assertRaises(InvalidPage):
            paginator.page(3)
        with self.assertRaises(PageNotAnInteger):
            paginator.validate_number(None)
        with self.assertRaises(PageNotAnInteger):
            paginator.validate_number('x') </s> remove         self.assertRaises(ZeroDivisionError, self.get_changelist, request, Book, modeladmin)
 </s> add         with self.assertRaises(ZeroDivisionError):
            self.get_changelist(request, Book, modeladmin) </s> remove         self.assertRaises(ImportError, import_module,
            'utils_tests.test_no_submodule.anything')
 </s> add         with self.assertRaises(ImportError):
            import_module('utils_tests.test_no_submodule.anything')
        with self.assertRaises(AttributeError):
            shortcut(request, user_ct.id, obj.id)
          }
          user_ct = ContentType.objects.get_for_model(FooWithBrokenAbsoluteUrl)
          obj = FooWithBrokenAbsoluteUrl.objects.create(name="john")
  
        with self.assertRaises(AttributeError):
            shortcut(request, user_ct.id, obj.id)
  
      def test_missing_model(self):
          """
          Ensures that displaying content types in admin (or anywhere) doesn't
          break on leftover content type records in the DB for which no model
keep keep keep keep replace keep keep keep keep keep
 Refs #26022 -- Used context manager version of assertRaises in tests. 
tests/contenttypes_tests/test_models.py