MCPcopy
hub / github.com/django/django / test_pk_validation

Method test_pk_validation

tests/model_regress/tests.py:251–255  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

249
250class ModelValidationTest(TestCase):
251 def test_pk_validation(self):
252 NonAutoPK.objects.create(name="one")
253 again = NonAutoPK(name="one")
254 with self.assertRaises(ValidationError):
255 again.validate_unique()
256
257
258class EvaluateMethodTest(TestCase):

Callers

nothing calls this directly

Calls 3

NonAutoPKClass · 0.85
createMethod · 0.45
validate_uniqueMethod · 0.45

Tested by

no test coverage detected