Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Dropping pointless self.fail calls

  • Loading branch information...
commit 7e8c64d8e68398937028400f801dbe02a830f9d4 1 parent ae6ffd2
Andrew Godwin authored September 18, 2012

Showing 1 changed file with 3 additions and 12 deletions. Show diff stats Hide diff stats

  1. 15  tests/modeltests/schema/tests.py
15  tests/modeltests/schema/tests.py
@@ -101,10 +101,7 @@ def test_creation_deletion(self):
101 101
         editor.create_model(Author)
102 102
         editor.commit()
103 103
         # Check that it's there
104  
-        try:
105  
-            list(Author.objects.all())
106  
-        except DatabaseError as e:
107  
-            self.fail("Table not created: %s" % e)
  104
+        list(Author.objects.all())
108 105
         # Clean up that table
109 106
         editor.start()
110 107
         editor.delete_model(Author)
@@ -126,14 +123,8 @@ def test_fk(self):
126 123
         editor.create_model(Tag)
127 124
         editor.commit()
128 125
         # Check that initial tables are there
129  
-        try:
130  
-            list(Author.objects.all())
131  
-        except DatabaseError as e:
132  
-            self.fail("Author table not created: %s" % e)
133  
-        try:
134  
-            list(Book.objects.all())
135  
-        except DatabaseError as e:
136  
-            self.fail("Book table not created: %s" % e)
  126
+        list(Author.objects.all())
  127
+        list(Book.objects.all())
137 128
         # Make sure the FK constraint is present
138 129
         with self.assertRaises(IntegrityError):
139 130
             Book.objects.create(

0 notes on commit 7e8c64d

Please sign in to comment.
Something went wrong with that request. Please try again.