'Ensures that displaying content types in admin (or anywhere) doesn\'t
break on leftover content type records in the DB for which no model
is defined anymore.'

def test_missing_model(self):

    ct = ContentType.objects.create(name=u'Old    model', app_label=u'contenttypes', model=u'OldModel')
    self.assertEqual(six.text_type(ct), u'Old    model')
    self.assertIsNone(ct.model_class())
    ct_fetched = ContentType.objects.get_for_id(ct.pk)
    self.assertIsNone(ct_fetched.model_class())
