1 2 3 4 5 6 7 8 9 10 11 12 13 | from django.test import TransactionTestCase as DjangoTransactionTestCase
[...]
class TransactionTestCase(DjangoTransactionTestCase):
"""
Works around Django issue 10827 by clearing the ContentType cache
before permissions are setup.
"""
def _pre_setup(self, *args, **kwargs):
ContentType.objects.clear_cache()
super(TransactionTestCase, self)._pre_setup(*args, **kwargs)
|
More like this
- Django cycle tag that doesn't continue where it left off by wilfred 4 months ago
- Hidden Date Display Widget for Admin by andrew.schoen 3 years, 9 months ago
- urlquote() and urlencode() in one method by guettli 4 years, 6 months ago
- Automatic stripping textual form fields by nail.xx 4 years, 9 months ago
- unique validation for ModelForm by whiskybar 5 years, 2 months ago
Comments