diff options
Diffstat (limited to 'tests')
-rw-r--r-- | tests/test_django.py | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/tests/test_django.py b/tests/test_django.py index 84b0933..41a26cf 100644 --- a/tests/test_django.py +++ b/tests/test_django.py @@ -167,6 +167,15 @@ class WithSignalsFactory(factory.django.DjangoModelFactory): @unittest.skipIf(django is None, "Django not installed.") +class ModelTests(django_test.TestCase): + def test_unset_model(self): + class UnsetModelFactory(factory.django.DjangoModelFactory): + pass + + self.assertRaises(factory.FactoryError, UnsetModelFactory.create) + + +@unittest.skipIf(django is None, "Django not installed.") class DjangoPkSequenceTestCase(django_test.TestCase): def setUp(self): super(DjangoPkSequenceTestCase, self).setUp() |