Skip to content

Commit

Permalink
Dropping pointless self.fail calls
Browse files Browse the repository at this point in the history
  • Loading branch information
andrewgodwin committed Sep 18, 2012
1 parent ae6ffd2 commit 7e8c64d
Showing 1 changed file with 3 additions and 12 deletions.
15 changes: 3 additions & 12 deletions tests/modeltests/schema/tests.py
Expand Up @@ -101,10 +101,7 @@ def test_creation_deletion(self):
editor.create_model(Author)
editor.commit()
# Check that it's there
try:
list(Author.objects.all())
except DatabaseError as e:
self.fail("Table not created: %s" % e)
list(Author.objects.all())
# Clean up that table
editor.start()
editor.delete_model(Author)
Expand All @@ -126,14 +123,8 @@ def test_fk(self):
editor.create_model(Tag)
editor.commit()
# Check that initial tables are there
try:
list(Author.objects.all())
except DatabaseError as e:
self.fail("Author table not created: %s" % e)
try:
list(Book.objects.all())
except DatabaseError as e:
self.fail("Book table not created: %s" % e)
list(Author.objects.all())
list(Book.objects.all())
# Make sure the FK constraint is present
with self.assertRaises(IntegrityError):
Book.objects.create(
Expand Down

0 comments on commit 7e8c64d

Please sign in to comment.