def test_cgroup_parent(self):
    self.mock_client.create_host_config.return_value = {}
    service = Service(name='foo', image='foo', hostname='name', client=self.mock_client, cgroup_parent='test')
    service._get_container_create_options({'some': 'overrides'}, 1)
    assert self.mock_client.create_host_config.called
    assert (self.mock_client.create_host_config.call_args[1]['cgroup_parent'] == 'test')
def test_cgroup_parent(self):
    self.mock_client.create_host_config.return_value = {}
    service = Service(name='foo', image='foo', hostname='name', client=self.mock_client, cgroup_parent='test')
    service._get_container_create_options({'some': 'overrides'}, 1)
    assert self.mock_client.create_host_config.called
    assert (self.mock_client.create_host_config.call_args[1]['cgroup_parent'] == 'test')