665
665
def test_get_branch_conf(self):
666
666
raise tests.KnownFailure('branch.conf is not retrieved by get_config_file')
667
# We should see that branch.get_config() does a single rpc to get the
668
# remote configuration file, abstracting away where that is stored on
669
# the server. However at the moment it always falls back to using the
670
# vfs, and this would need some changes in config.py.
667
## # We should see that branch.get_config() does a single rpc to get the
668
## # remote configuration file, abstracting away where that is stored on
669
## # the server. However at the moment it always falls back to using the
670
## # vfs, and this would need some changes in config.py.
672
# in an empty branch we decode the response properly
673
client = FakeClient(self.get_url())
674
client.add_success_response_with_body('# config file body', 'ok')
675
# we need to make a real branch because the remote_branch.control_files
676
# will trigger _ensure_real.
677
branch = self.make_branch('quack')
678
transport = branch.bzrdir.root_transport
679
# we do not want bzrdir to make any remote calls
680
bzrdir = RemoteBzrDir(transport, _client=False)
681
branch = RemoteBranch(bzrdir, None, _client=client)
682
config = branch.get_config()
684
[('call_expecting_body', 'Branch.get_config_file', ('quack/',))],
672
## # in an empty branch we decode the response properly
673
## client = FakeClient([(('ok', ), '# config file body')], self.get_url())
674
## # we need to make a real branch because the remote_branch.control_files
675
## # will trigger _ensure_real.
676
## branch = self.make_branch('quack')
677
## transport = branch.bzrdir.root_transport
678
## # we do not want bzrdir to make any remote calls
679
## bzrdir = RemoteBzrDir(transport, _client=False)
680
## branch = RemoteBranch(bzrdir, None, _client=client)
681
## config = branch.get_config()
683
## [('call_expecting_body', 'Branch.get_config_file', ('quack/',))],
688
687
class TestBranchLockWrite(tests.TestCase):