def test_config_hash_matches_label(self):
    self.mock_client.inspect_image.return_value = {'Id': 'abcd'}
    service = Service('foo', image='example.com/foo', client=self.mock_client, network_mode=NetworkMode('bridge'), networks={'bridge': {}, 'net2': {}}, links=[(Service('one', client=self.mock_client), 'one')], volumes_from=[VolumeFromSpec(Service('two', client=self.mock_client), 'rw', 'service')], volumes=[VolumeSpec('/ext', '/int', 'ro')], build={'context': 'some/random/path'})
    config_hash = service.config_hash
    for api_version in set(API_VERSIONS.values()):
        self.mock_client.api_version = api_version
        assert (service._get_container_create_options({}, 1)['labels'][LABEL_CONFIG_HASH] == config_hash)
def test_config_hash_matches_label(self):
    self.mock_client.inspect_image.return_value = {'Id': 'abcd'}
    service = Service('foo', image='example.com/foo', client=self.mock_client, network_mode=NetworkMode('bridge'), networks={'bridge': {}, 'net2': {}}, links=[(Service('one', client=self.mock_client), 'one')], volumes_from=[VolumeFromSpec(Service('two', client=self.mock_client), 'rw', 'service')], volumes=[VolumeSpec('/ext', '/int', 'ro')], build={'context': 'some/random/path'})
    config_hash = service.config_hash
    for api_version in set(API_VERSIONS.values()):
        self.mock_client.api_version = api_version
        assert (service._get_container_create_options({}, 1)['labels'][LABEL_CONFIG_HASH] == config_hash)