def test_config_dict(self):
    self.mock_client.inspect_image.return_value = {'Id': 'abcd'}
    service = Service('foo', image='example.com/foo', client=self.mock_client, network_mode=ServiceNetworkMode(Service('other')), networks={'default': None}, links=[(Service('one'), 'one')], volumes_from=[VolumeFromSpec(Service('two'), 'rw', 'service')])
    config_dict = service.config_dict()
    expected = {'image_id': 'abcd', 'options': {'image': 'example.com/foo'}, 'links': [('one', 'one')], 'net': 'other', 'networks': {'default': None}, 'volumes_from': [('two', 'rw')]}
    assert (config_dict == expected)
def test_config_dict(self):
    self.mock_client.inspect_image.return_value = {'Id': 'abcd'}
    service = Service('foo', image='example.com/foo', client=self.mock_client, network_mode=ServiceNetworkMode(Service('other')), networks={'default': None}, links=[(Service('one'), 'one')], volumes_from=[VolumeFromSpec(Service('two'), 'rw', 'service')])
    config_dict = service.config_dict()
    expected = {'image_id': 'abcd', 'options': {'image': 'example.com/foo'}, 'links': [('one', 'one')], 'net': 'other', 'networks': {'default': None}, 'volumes_from': [('two', 'rw')]}
    assert (config_dict == expected)