~launchpad-pqm/launchpad/devel

« back to all changes in this revision

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

Merged rocketfuel into trivial.

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)