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