Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

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.
  • Loading branch information...
commit 18d7c1ea3ad4523ec848b800fd85984582efe32c 1 parent fdb5c98
@freakboy3742 freakboy3742 authored
Showing with 2 additions and 2 deletions.
  1. +2 −2 tests/regressiontests/swappable_models/tests.py
View
4 tests/regressiontests/swappable_models/tests.py
@@ -26,8 +26,8 @@ def test_generated_data(self):
"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()
Please sign in to comment.
Something went wrong with that request. Please try again.