mirror of https://github.com/django/django.git
Python 3 compatability. 2.6 was a while back, I should learn ' as '.
This commit is contained in:
parent
c5e2ecae69
commit
06227fbb83
|
@ -103,7 +103,7 @@ class SchemaTests(TestCase):
|
||||||
# Check that it's there
|
# Check that it's there
|
||||||
try:
|
try:
|
||||||
list(Author.objects.all())
|
list(Author.objects.all())
|
||||||
except DatabaseError, e:
|
except DatabaseError as e:
|
||||||
self.fail("Table not created: %s" % e)
|
self.fail("Table not created: %s" % e)
|
||||||
# Clean up that table
|
# Clean up that table
|
||||||
editor.start()
|
editor.start()
|
||||||
|
@ -128,11 +128,11 @@ class SchemaTests(TestCase):
|
||||||
# Check that initial tables are there
|
# Check that initial tables are there
|
||||||
try:
|
try:
|
||||||
list(Author.objects.all())
|
list(Author.objects.all())
|
||||||
except DatabaseError, e:
|
except DatabaseError as e:
|
||||||
self.fail("Author table not created: %s" % e)
|
self.fail("Author table not created: %s" % e)
|
||||||
try:
|
try:
|
||||||
list(Book.objects.all())
|
list(Book.objects.all())
|
||||||
except DatabaseError, e:
|
except DatabaseError as e:
|
||||||
self.fail("Book table not created: %s" % e)
|
self.fail("Book table not created: %s" % e)
|
||||||
# Make sure the FK constraint is present
|
# Make sure the FK constraint is present
|
||||||
with self.assertRaises(IntegrityError):
|
with self.assertRaises(IntegrityError):
|
||||||
|
|
Loading…
Reference in New Issue