def test_get_container_create_options_with_different_host_path_in_container_json(self):
    service = Service('web', image='busybox', volumes=[VolumeSpec.parse('/host/path:/data')], client=self.mock_client)
    volume_name = 'abcdefff1234'
    self.mock_client.inspect_image.return_value = {'Id': 'ababab', 'ContainerConfig': {'Volumes': {'/data': {}}}}
    self.mock_client.inspect_container.return_value = {'Id': '123123123', 'Image': 'ababab', 'Mounts': [{'Destination': '/data', 'Source': '/mnt/sda1/host/path', 'Mode': '', 'RW': True, 'Driver': 'local', 'Name': volume_name}]}
    service._get_container_create_options(override_options={}, number=1, previous_container=Container(self.mock_client, {'Id': '123123123'}))
    assert (self.mock_client.create_host_config.call_args[1]['binds'] == ['{}:/data:rw'.format(volume_name)])
def test_get_container_create_options_with_different_host_path_in_container_json(self):
    service = Service('web', image='busybox', volumes=[VolumeSpec.parse('/host/path:/data')], client=self.mock_client)
    volume_name = 'abcdefff1234'
    self.mock_client.inspect_image.return_value = {'Id': 'ababab', 'ContainerConfig': {'Volumes': {'/data': {}}}}
    self.mock_client.inspect_container.return_value = {'Id': '123123123', 'Image': 'ababab', 'Mounts': [{'Destination': '/data', 'Source': '/mnt/sda1/host/path', 'Mode': , 'RW': True, 'Driver': 'local', 'Name': volume_name}]}
    service._get_container_create_options(override_options={}, number=1, previous_container=Container(self.mock_client, {'Id': '123123123'}))
    assert (self.mock_client.create_host_config.call_args[1]['binds'] == ['{}:/data:rw'.format(volume_name)])