summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorAndrew Godwin <andrew@aeracode.org>2012-08-18 14:16:52 +0100
committerAndrew Godwin <andrew@aeracode.org>2012-08-18 14:16:52 +0100
commitd3d1e599211c31e05d095b878de517dbb6fc998c (patch)
tree58993c657ad08afb6249876e7e700ed0d493f5b4 /tests
parent0b013951086814ebee048f0fa9a620e03f891494 (diff)
Add a SQlite backend. One test passes!
Diffstat (limited to 'tests')
-rw-r--r--tests/modeltests/schema/tests.py12
1 files changed, 6 insertions, 6 deletions
diff --git a/tests/modeltests/schema/tests.py b/tests/modeltests/schema/tests.py
index 18f1abad63..3d0b106405 100644
--- a/tests/modeltests/schema/tests.py
+++ b/tests/modeltests/schema/tests.py
@@ -44,18 +44,18 @@ class SchemaTests(TestCase):
# Remove any M2M tables first
for field in model._meta.local_many_to_many:
try:
- cursor.execute("DROP TABLE %s CASCADE" % (
- connection.ops.quote_name(field.rel.through._meta.db_table),
- ))
+ cursor.execute(connection.schema_editor().sql_delete_table % {
+ "table": connection.ops.quote_name(field.rel.through._meta.db_table),
+ })
except DatabaseError:
connection.rollback()
else:
connection.commit()
# Then remove the main tables
try:
- cursor.execute("DROP TABLE %s CASCADE" % (
- connection.ops.quote_name(model._meta.db_table),
- ))
+ cursor.execute(connection.schema_editor().sql_delete_table % {
+ "table": connection.ops.quote_name(model._meta.db_table),
+ })
except DatabaseError:
connection.rollback()
else: