2042
2042
branch.unlock()
2043
2043
self.assertFinished(client)
2045
def test_set_option_with_bool(self):
2046
client = FakeClient()
2047
client.add_expected_call(
2048
b'Branch.get_stacked_on_url', (b'memory:///',),
2049
b'error', (b'NotStacked',),)
2050
client.add_expected_call(
2051
b'Branch.lock_write', (b'memory:///', b'', b''),
2052
b'success', (b'ok', b'branch token', b'repo token'))
2053
client.add_expected_call(
2054
b'Branch.set_config_option', (b'memory:///', b'branch token',
2055
b'repo token', b'True', b'foo', b''),
2057
client.add_expected_call(
2058
b'Branch.unlock', (b'memory:///', b'branch token', b'repo token'),
2059
b'success', (b'ok',))
2060
transport = MemoryTransport()
2061
branch = self.make_remote_branch(transport, client)
2063
config = branch._get_config()
2064
config.set_option(True, 'foo')
2066
self.assertFinished(client)
2045
2068
def test_backwards_compat_set_option(self):
2046
2069
self.setup_smart_server_with_call_log()
2047
2070
branch = self.make_branch('.')