def test_log_opt(self):
    self.mock_client.create_host_config.return_value = {}
    log_opt = {'syslog-address': 'tcp://192.168.0.42:123'}
    logging = {'driver': 'syslog', 'options': log_opt}
    service = Service(name='foo', image='foo', hostname='name', client=self.mock_client, log_driver='syslog', logging=logging)
    service._get_container_create_options({'some': 'overrides'}, 1)
    assert self.mock_client.create_host_config.called
    assert (self.mock_client.create_host_config.call_args[1]['log_config'] == {'Type': 'syslog', 'Config': {'syslog-address': 'tcp://192.168.0.42:123'}})
def test_log_opt(self):
    self.mock_client.create_host_config.return_value = {}
    log_opt = {'syslog-address': 'tcp://192.168.0.42:123'}
    logging = {'driver': 'syslog', 'options': log_opt}
    service = Service(name='foo', image='foo', hostname='name', client=self.mock_client, log_driver='syslog', logging=logging)
    service._get_container_create_options({'some': 'overrides'}, 1)
    assert self.mock_client.create_host_config.called
    assert (self.mock_client.create_host_config.call_args[1]['log_config'] == {'Type': 'syslog', 'Config': {'syslog-address': 'tcp://192.168.0.42:123'}})