407
407
call.call.method == verb])
408
408
self.assertEqual(1, call_count)
410
def test_branch_reference(self):
411
transport = self.get_transport('quack')
412
referenced = self.make_branch('referenced')
413
expected = referenced.bzrdir.cloning_metadir()
414
client = FakeClient(transport.base)
415
client.add_expected_call(
416
'BzrDir.cloning_metadir', ('quack/', 'False'),
417
'error', ('BranchReference',)),
418
client.add_expected_call(
419
'BzrDir.open_branchV2', ('quack/',),
420
'success', ('ref', self.get_url('referenced'))),
421
a_bzrdir = RemoteBzrDir(transport, remote.RemoteBzrDirFormat(),
423
result = a_bzrdir.cloning_metadir()
424
# We should have got a control dir matching the referenced branch.
425
self.assertEqual(bzrdir.BzrDirMetaFormat1, type(result))
426
self.assertEqual(expected._repository_format, result._repository_format)
427
self.assertEqual(expected._branch_format, result._branch_format)
428
client.finished_test()
410
430
def test_current_server(self):
411
431
transport = self.get_transport('.')
412
432
transport = transport.clone('quack')