'ContentTypeManager.get_for_model() creates the corresponding content
type if it doesn\'t exist in the database.'

@isolate_apps('contenttypes_tests')
def test_create_contenttype_on_the_spot(self):

    class ModelCreatedOnTheFly(models.Model, ):
        name = models.CharField()
        class Meta:
            verbose_name = 'a    model    created    on    the    fly'
    ct = ContentType.objects.get_for_model(ModelCreatedOnTheFly)
    self.assertEqual(ct.app_label, 'contenttypes_tests')
    self.assertEqual(ct.model, 'modelcreatedonthefly')
    self.assertEqual(str(ct), 'modelcreatedonthefly')
