summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRussell Keith-Magee <russell@keith-magee.com>2012-11-24 15:07:50 +0800
committerRussell Keith-Magee <russell@keith-magee.com>2012-11-24 15:07:50 +0800
commit18d7c1ea3ad4523ec848b800fd85984582efe32c (patch)
tree768e93e8ce3b82c703a982d5252674ec128aa48c
parentfdb5c98d7ee54c7f89ec10b0203263f1f5b37510 (diff)
Simplified the deletions performed by the swappable_models test.
This is required to allow the test to run without error under SQLite in the CI environment.
-rw-r--r--tests/regressiontests/swappable_models/tests.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/tests/regressiontests/swappable_models/tests.py b/tests/regressiontests/swappable_models/tests.py
index d9a01f9e26..75644e32aa 100644
--- a/tests/regressiontests/swappable_models/tests.py
+++ b/tests/regressiontests/swappable_models/tests.py
@@ -26,8 +26,8 @@ class SwappableModelTests(TestCase):
"Permissions and content types are not created for a swapped model"
# Delete all permissions and content_types
- Permission.objects.all().delete()
- ContentType.objects.all().delete()
+ Permission.objects.filter(content_type__app_label='swappable_models').delete()
+ ContentType.objects.filter(app_label='swappable_models').delete()
# Re-run syncdb. This will re-build the permissions and content types.
new_io = StringIO()