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.
This commit is contained in:
Russell Keith-Magee 2012-11-24 15:07:50 +08:00
parent fdb5c98d7e
commit 18d7c1ea3a
1 changed files with 2 additions and 2 deletions

View File

@ -26,8 +26,8 @@ class SwappableModelTests(TestCase):
"Permissions and content types are not created for a swapped model" "Permissions and content types are not created for a swapped model"
# Delete all permissions and content_types # Delete all permissions and content_types
Permission.objects.all().delete() Permission.objects.filter(content_type__app_label='swappable_models').delete()
ContentType.objects.all().delete() ContentType.objects.filter(app_label='swappable_models').delete()
# Re-run syncdb. This will re-build the permissions and content types. # Re-run syncdb. This will re-build the permissions and content types.
new_io = StringIO() new_io = StringIO()