~free.ekanayaka/storm/any-expr

« back to all changes in this revision

Viewing changes to tests/django/stores.py

  • Committer: Jamu Kakar
  • Date: 2009-11-24 19:10:43 UTC
  • mfrom: (327.2.4 default-c-extensions)
  • Revision ID: jkakar@kakar.ca-20091124191043-z45n74ff1ebnh4w3
Merged default-c-extensions [r=jamesh,therve] [f=410592]

Storm's C extensions are enabled by default.  They can be disabled
by defining the STORM_CEXTENSIONS environment variable to '0'.

Show diffs side-by-side

added added

removed removed

Lines of Context:
22
22
import threading
23
23
 
24
24
try:
25
 
    from django import conf
 
25
    import django
26
26
    import transaction
27
27
except ImportError:
28
28
    have_django_and_transaction = False
29
29
else:
30
30
    have_django_and_transaction = True
 
31
    from django import conf
31
32
    from storm.django import stores
32
33
    from storm.zope.zstorm import global_zstorm
33
34
 
45
46
        conf.settings.configure(STORM_STORES={})
46
47
 
47
48
    def tearDown(self):
48
 
        conf.settings._target = None
 
49
        if django.VERSION >= (1, 1):
 
50
            conf.settings._wrapped = None
 
51
        else:
 
52
            conf.settings._target = None
49
53
        # Reset the utility to cleanup the StoreSynchronizer's from the
50
54
        # transaction.
51
55
        global_zstorm._reset()