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:08:28 +0800
commit2ecf3a9344812ed4e6d1f8ca27238ee574f2e096 (patch)
tree4f5320265fa8513a2b42b32440ca81af27ea44d3
parent24582f18ff3aeb263f951dd2acf56f0a857fda17 (diff)
[1.5.x] 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. Backport of 18d7c1e.
-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()