From 18d7c1ea3ad4523ec848b800fd85984582efe32c Mon Sep 17 00:00:00 2001 From: Russell Keith-Magee Date: Sat, 24 Nov 2012 15:07:50 +0800 Subject: [PATCH] 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. --- tests/regressiontests/swappable_models/tests.py | 4 ++-- 1 file 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()