diff options
author | Daniyal <abbasi.daniyal98@gmail.com> | 2021-03-24 11:15:08 +0530 |
---|---|---|
committer | Mariusz Felisiak <felisiak.mariusz@gmail.com> | 2021-07-15 11:43:33 +0200 |
commit | f479df7f8d03ab767bb5e5d655243191087d6432 (patch) | |
tree | bf6f248ad7938a0d9f77ea616a59fba2d5a8befb /tests/validation | |
parent | 08f077888548a951f01b454d0db08d9407f7f0aa (diff) | |
download | django-f479df7f8d03ab767bb5e5d655243191087d6432.tar.gz |
Refs #32508 -- Raised Type/ValueError instead of using "assert" in django.db.models.
Co-authored-by: Mariusz Felisiak <felisiak.mariusz@gmail.com>
Diffstat (limited to 'tests/validation')
-rw-r--r-- | tests/validation/models.py | 15 |
1 files changed, 0 insertions, 15 deletions
diff --git a/tests/validation/models.py b/tests/validation/models.py index ff9aad11f0..3a5a9cd354 100644 --- a/tests/validation/models.py +++ b/tests/validation/models.py @@ -125,18 +125,3 @@ class GenericIPAddressTestModel(models.Model): class GenericIPAddrUnpackUniqueTest(models.Model): generic_v4unpack_ip = models.GenericIPAddressField(null=True, blank=True, unique=True, unpack_ipv4=True) - - -# A model can't have multiple AutoFields -# Refs #12467. -assertion_error = None -try: - class MultipleAutoFields(models.Model): - auto1 = models.AutoField(primary_key=True) - auto2 = models.AutoField(primary_key=True) -except AssertionError as exc: - assertion_error = exc -assert str(assertion_error) == ( - "Model validation.MultipleAutoFields can't have more than one " - "auto-generated field." -) |