Kaydet (Commit) 34011520 authored tarafından Jacob Burch's avatar Jacob Burch Kaydeden (comit) Aymeric Augustin

Fixed #20432 -- Test failure in admin_views.

The failure was triggered by a cache leak.
üst 566e284c
...@@ -7,6 +7,7 @@ from django.contrib.auth.management.commands import changepassword ...@@ -7,6 +7,7 @@ from django.contrib.auth.management.commands import changepassword
from django.contrib.auth.models import User from django.contrib.auth.models import User
from django.contrib.auth.tests.test_custom_user import CustomUser from django.contrib.auth.tests.test_custom_user import CustomUser
from django.contrib.auth.tests.utils import skipIfCustomUser from django.contrib.auth.tests.utils import skipIfCustomUser
from django.contrib.contenttypes.models import ContentType
from django.core.management import call_command from django.core.management import call_command
from django.core.management.base import CommandError from django.core.management.base import CommandError
from django.core.management.validation import get_validation_errors from django.core.management.validation import get_validation_errors
...@@ -195,6 +196,7 @@ class PermissionDuplicationTestCase(TestCase): ...@@ -195,6 +196,7 @@ class PermissionDuplicationTestCase(TestCase):
def tearDown(self): def tearDown(self):
models.Permission._meta.permissions = self._original_permissions models.Permission._meta.permissions = self._original_permissions
ContentType.objects.clear_cache()
def test_duplicated_permissions(self): def test_duplicated_permissions(self):
""" """
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment