def test_build_volume_options_duplicate_binds(self):
    self.mock_client.api_version = '1.29'
    service = Service('foo', client=self.mock_client)
    (ctnr_opts, override_opts) = service._build_container_volume_options(previous_container=None, container_options={'volumes': [MountSpec.parse({'source': 'vol', 'target': '/data', 'type': 'volume'}), VolumeSpec.parse('vol:/data:rw')], 'environment': {}}, override_options={})
    assert ('binds' in override_opts)
    assert (len(override_opts['binds']) == 1)
    assert (override_opts['binds'][0] == 'vol:/data:rw')
def test_build_volume_options_duplicate_binds(self):
    self.mock_client.api_version = '1.29'
    service = Service('foo', client=self.mock_client)
    (ctnr_opts, override_opts) = service._build_container_volume_options(previous_container=None, container_options={'volumes': [MountSpec.parse({'source': 'vol', 'target': '/data', 'type': 'volume'}), VolumeSpec.parse('vol:/data:rw')], 'environment': {}}, override_options={})
    assert ('binds' in override_opts)
    assert (len(override_opts['binds']) == 1)
    assert (override_opts['binds'][0] == 'vol:/data:rw')