def test_get_enterprise_customers(self): """ Verify that "get_enterprise_customers" returns an appropriate response from the "enterprise-customer" Enterprise service API endpoint. """ self.mock_access_token_response() self.mock_enterprise_customer_list_api_get() response = get_enterprise_customers(self.request) self.assertEqual(response[0]['name'], "Enterprise Customer 1") self.assertEqual(response[1]['name'], "Enterprise Customer 2")
def get(self, request): site = request.site return Response(data={'results': get_enterprise_customers(site)})
def get(self, request): return Response(get_enterprise_customers(request))
def get(self, request): site = request.site return Response(data={'results': get_enterprise_customers(site, token=request.user.access_token)})