

def _test_list_resources(self, resource, items, neutron_context=None, query_params=None):
    if resource.endswith('y'):
        resource_plural = resource.replace('y', 'ies')
    else:
        resource_plural = (resource + 's')
    res = self._list(resource_plural, neutron_context=neutron_context, query_params=query_params)
    resource = resource.replace('-', '_')
    self.assertEqual(sorted([i[resource]['id'] for i in items]), sorted([i['id'] for i in res[resource_plural]]))

dataset/ETHPy150Open openstack/networking-cisco/networking_cisco/tests/unit/cisco/device_manager/test_db_device_manager.py DeviceManagerTestCaseMixin._test_list_resources/original