def test_cant_instantiate_base_model(self):
        # direct instantiation shouldn't work
        self.assertRaises(RuntimeError, Animal.objects.create, name="uhoh")

        # ... unless a type is specified
        Animal.objects.create(name="dingo", type="typedmodels.canine")

        # ... unless that type is stupid
        try:
            Animal.objects.create(name="dingo", type="macaroni.buffaloes")
        except __HOLE__:
            pass
dataset/ETHPy150Open craigds/django-typed-models/typedmodels/tests.py/TestTypedModels.test_cant_instantiate_base_model