mirror of https://github.com/django/django.git
Dropping pointless self.fail calls
This commit is contained in:
parent
ae6ffd2e7e
commit
7e8c64d8e6
|
@ -101,10 +101,7 @@ class SchemaTests(TestCase):
|
||||||
editor.create_model(Author)
|
editor.create_model(Author)
|
||||||
editor.commit()
|
editor.commit()
|
||||||
# Check that it's there
|
# Check that it's there
|
||||||
try:
|
|
||||||
list(Author.objects.all())
|
list(Author.objects.all())
|
||||||
except DatabaseError as e:
|
|
||||||
self.fail("Table not created: %s" % e)
|
|
||||||
# Clean up that table
|
# Clean up that table
|
||||||
editor.start()
|
editor.start()
|
||||||
editor.delete_model(Author)
|
editor.delete_model(Author)
|
||||||
|
@ -126,14 +123,8 @@ class SchemaTests(TestCase):
|
||||||
editor.create_model(Tag)
|
editor.create_model(Tag)
|
||||||
editor.commit()
|
editor.commit()
|
||||||
# Check that initial tables are there
|
# Check that initial tables are there
|
||||||
try:
|
|
||||||
list(Author.objects.all())
|
list(Author.objects.all())
|
||||||
except DatabaseError as e:
|
|
||||||
self.fail("Author table not created: %s" % e)
|
|
||||||
try:
|
|
||||||
list(Book.objects.all())
|
list(Book.objects.all())
|
||||||
except DatabaseError as 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):
|
||||||
Book.objects.create(
|
Book.objects.create(
|
||||||
|
|
Loading…
Reference in New Issue