mirror of
https://github.com/django/django.git
synced 2025-10-26 15:16:09 +00:00
Fixed a couple of assert syntax warnings mistakingly introduced in r16966 and added some tests to prevent future regressions. Thanks to Anssi Kääriäinen for the report.
Refs #12467. git-svn-id: http://code.djangoproject.com/svn/django/trunk@16971 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
@@ -90,3 +90,13 @@ class GenericIPAddressTestModel(models.Model):
|
||||
|
||||
class GenericIPAddrUnpackUniqueTest(models.Model):
|
||||
generic_v4unpack_ip = models.GenericIPAddressField(blank=True, unique=True, unpack_ipv4=True)
|
||||
|
||||
|
||||
try:
|
||||
# A model can't have multiple AutoFields
|
||||
# Refs #12467.
|
||||
class MultipleAutoFields(models.Model):
|
||||
auto1 = models.AutoField(primary_key=True)
|
||||
auto2 = models.AutoField(primary_key=True)
|
||||
except AssertionError, e:
|
||||
assert e.message == u"A model can't have more than one AutoField."
|
||||
Reference in New Issue
Block a user