mirror of
https://github.com/django/django.git
synced 2024-12-01 15:42:04 +01:00
Fix a test that relied on an exception outliving the except
block, which doesn't happen on py3k.
This commit is contained in:
parent
bf4da7a442
commit
46cc530fad
@ -101,6 +101,6 @@ try:
|
||||
class MultipleAutoFields(models.Model):
|
||||
auto1 = models.AutoField(primary_key=True)
|
||||
auto2 = models.AutoField(primary_key=True)
|
||||
except AssertionError as assertion_error:
|
||||
pass # Fail silently
|
||||
except AssertionError as exc:
|
||||
assertion_error = exc
|
||||
assert str(assertion_error) == "A model can't have more than one AutoField."
|
||||
|
Loading…
Reference in New Issue
Block a user