diff options
| author | Andrew Godwin <andrew@aeracode.org> | 2012-09-18 10:59:03 +0100 |
|---|---|---|
| committer | Andrew Godwin <andrew@aeracode.org> | 2012-09-18 10:59:03 +0100 |
| commit | 7e8c64d8e68398937028400f801dbe02a830f9d4 (patch) | |
| tree | da4d798ebc4623eedaeb504228db14704fefa034 | |
| parent | ae6ffd2e7ef69180560eaeae9a00f76cd3721691 (diff) | |
Dropping pointless self.fail calls
| -rw-r--r-- | tests/modeltests/schema/tests.py | 15 |
1 files changed, 3 insertions, 12 deletions
diff --git a/tests/modeltests/schema/tests.py b/tests/modeltests/schema/tests.py index 3a9f85643a..7c3e6ffc03 100644 --- a/tests/modeltests/schema/tests.py +++ b/tests/modeltests/schema/tests.py @@ -101,10 +101,7 @@ class SchemaTests(TestCase): 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) @@ -126,14 +123,8 @@ class SchemaTests(TestCase): 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( |
