~jbaker/storm/nose_plugin

« back to all changes in this revision

Viewing changes to tests/django/stores.py

  • Committer: Jamu Kakar
  • Date: 2009-11-24 18:34:34 UTC
  • mfrom: (340 storm.trunk)
  • mto: This revision was merged to the branch mainline in revision 341.
  • Revision ID: jkakar@kakar.ca-20091124183434-ambkvw9tp2byvjnc
- Merged trunk.

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()