~launchpad-pqm/launchpad/devel

« back to all changes in this revision

Viewing changes to lib/lp/codehosting/scanner/tests/test_bzrsync.py

  • Committer: Jelmer Vernooij
  • Date: 2011-09-21 14:28:02 UTC
  • mfrom: (14006 devel)
  • mto: This revision was merged to the branch mainline in revision 14010.
  • Revision ID: jelmer@canonical.com-20110921142802-7ggkc204igsy532w
MergeĀ lp:launchpad

Show diffs side-by-side

added added

removed removed

Lines of Context:
24
24
from zope.security.proxy import removeSecurityProxy
25
25
 
26
26
from canonical.config import config
 
27
from canonical.database.sqlbase import ZopelessTransactionManager
27
28
from canonical.launchpad.interfaces.lpstorm import IStore
28
29
from canonical.testing.layers import LaunchpadZopelessLayer
29
30
from lp.code.interfaces.branchjob import IRosettaUploadJobSource
65
66
    def _run_with_different_user(f):
66
67
 
67
68
        def decorated(*args, **kwargs):
68
 
            current_user = LaunchpadZopelessLayer.txn._dbuser
 
69
            current_user = ZopelessTransactionManager._dbuser
69
70
            if current_user == username:
70
71
                return f(*args, **kwargs)
71
72
            LaunchpadZopelessLayer.switchDbUser(username)