Login

Work around issue 10827

Author:
scjody
Posted:
May 17, 2012
Language:
Python
Version:
1.4
Tags:
workaround
Score:
0 (after 0 ratings)

Work around Django issue 10827

 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

  1. NoDoubleSlashes middleware by simon 7 years, 7 months ago
  2. unique validation for ModelForm by whiskybar 7 years, 5 months ago
  3. Mini issue tracker by pbx 8 years, 6 months ago
  4. GeoDjango maps in admin TabularInlines by alanB 4 years, 10 months ago
  5. create_template_postgis-ubuntu_lucid by clawlor 4 years, 11 months ago

Comments

Please login first before commenting.