def test_get_container_create_options_no_affinity_without_binds(self):
    service = Service('foo', image='foo', client=self.mock_client)
    self.mock_client.inspect_image.return_value = {'Id': 'abcd'}
    prev_container = mock.Mock(id='ababab', image_config={'ContainerConfig': {}})
    prev_container.get.return_value = None
    opts = service._get_container_create_options({}, 1, previous_container=prev_container)
    assert (opts['environment'] == [])
def test_get_container_create_options_no_affinity_without_binds(self):
    service = Service('foo', image='foo', client=self.mock_client)
    self.mock_client.inspect_image.return_value = {'Id': 'abcd'}
    prev_container = mock.Mock(id='ababab', image_config={'ContainerConfig': {}})
    prev_container.get.return_value = None
    opts = service._get_container_create_options({}, 1, previous_container=prev_container)
    assert (opts['environment'] == [])