diff --git a/src/objects/core/tests/test_models.py b/src/objects/core/tests/test_models.py new file mode 100644 index 00000000..d46530f8 --- /dev/null +++ b/src/objects/core/tests/test_models.py @@ -0,0 +1,9 @@ +from .factories import ObjectTypeFactory +from django.test import TestCase +from django.db import IntegrityError + +class ObjectTypeTest(TestCase): + def test_duplicate_name(self): + ObjectTypeFactory.create(_name="test") + with self.assertRaises(IntegrityError): + ObjectTypeFactory.create(_name="test") \ No newline at end of file