~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/test_smart_request.py

  • Committer: Vincent Ladeuil
  • Date: 2009-04-08 13:13:30 UTC
  • mfrom: (4202.4.3 348459-wrong-annotation)
  • mto: This revision was merged to the branch mainline in revision 4273.
  • Revision ID: v.ladeuil+lp@free.fr-20090408131330-mx1hq45oarrxia2z
Allows external annotation tie-breakers

Show diffs side-by-side

added added

removed removed

Lines of Context:
159
159
            ('NoSuchFile', 'path'), errors.NoSuchFile('path'))
160
160
 
161
161
    def test_LockContention(self):
162
 
        # For now, LockContentions are always transmitted with no details.
163
 
        # Eventually they should include a relpath or url or something else to
164
 
        # identify which lock is busy.
165
162
        self.assertTranslationEqual(
166
 
            ('LockContention',), errors.LockContention('lock', 'msg'))
 
163
            ('LockContention', 'lock', 'msg'),
 
164
            errors.LockContention('lock', 'msg'))
167
165
 
168
166
    def test_TokenMismatch(self):
169
167
        self.assertTranslationEqual(
201
199
        # A child of a transport in jail_info is allowed
202
200
        _pre_open_hook(t.clone('child'))
203
201
        # A parent is not allowed
204
 
        self.assertRaises(errors.JailBreak, _pre_open_hook, t.clone('..'))
 
202
        self.assertRaises(errors.BzrError, _pre_open_hook, t.clone('..'))
205
203
        # A completely unrelated transport is not allowed
206
204
        self.assertRaises(
207
 
            errors.JailBreak, _pre_open_hook, get_transport('http://host/'))
 
205
            errors.BzrError, _pre_open_hook, get_transport('http://host/'))
208
206
 
209
207
    def test_open_bzrdir_in_non_main_thread(self):
210
208
        """Opening a bzrdir in a non-main thread should work ok.