def test_create_with_special_volume_mode(self):
    self.mock_client.inspect_image.return_value = {'Id': 'imageid'}
    self.mock_client.create_container.return_value = {'Id': 'containerid'}
    volume = '/tmp:/foo:z'
    Service('web', client=self.mock_client, image='busybox', volumes=[VolumeSpec.parse(volume, True)]).create_container()
    assert (self.mock_client.create_container.call_count == 1)
    assert (self.mock_client.create_host_config.call_args[1]['binds'] == [volume])
def test_create_with_special_volume_mode(self):
    self.mock_client.inspect_image.return_value = {'Id': 'imageid'}
    self.mock_client.create_container.return_value = {'Id': 'containerid'}
    volume = '/tmp:/foo:z'
    Service('web', client=self.mock_client, image='busybox', volumes=[VolumeSpec.parse(volume, True)]).create_container()
    assert (self.mock_client.create_container.call_count == 1)
    assert (self.mock_client.create_host_config.call_args[1]['binds'] == [volume])