Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Fix a test that relied on an exception outliving the `except` block, …

…which doesn't happen on py3k.
  • Loading branch information...
commit 46cc530fad3c6ae4009557121971fe749742aef6 1 parent bf4da7a
@alex alex authored
Showing with 2 additions and 2 deletions.
  1. +2 −2 tests/modeltests/validation/models.py
View
4 tests/modeltests/validation/models.py
@@ -101,6 +101,6 @@ class GenericIPAddrUnpackUniqueTest(models.Model):
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."
Please sign in to comment.
Something went wrong with that request. Please try again.