

def _check_user_list_access_customers(self, customers, test_function):
    response = self.client.get(reverse('customer-list'))
    self.assertEqual(response.status_code, status.HTTP_200_OK)
    urls = set([instance['url'] for instance in response.data])
    for customer in customers:
        url = self._get_customer_url(customer)
        getattr(self, test_function)(url, urls)

dataset/ETHPy150Open opennode/nodeconductor/nodeconductor/iaas/tests/test_customer_addendum.py CustomerAddendumApiPermissionTest._check_user_list_access_customers/original