'Call ``GET /users`` when multiple backends is enabled.
In this scenario, the controller requires a domain to be specified
either as a filter or by using a domain scoped token.'

def test_list_users_with_multiple_backends(self):

    self.config_fixture.config(group='identity', domain_specific_drivers_enabled=True)
    domain = unit.new_domain_ref()
    self.resource_api.create_domain(domain['id'], domain)
    project = unit.new_project_ref(domain_id=domain['id'])
    self.resource_api.create_project(project['id'], project)
    user = unit.create_user(self.identity_api, domain_id=domain['id'])
    self.assignment_api.create_grant(role_id=self.role_id, user_id=user['id'], domain_id=domain['id'])
    self.assignment_api.create_grant(role_id=self.role_id, user_id=user['id'], project_id=project['id'])
    dom_auth = self.build_authentication_request(user_id=user['id'], password=user['password'], domain_id=domain['id'])
    project_auth = self.build_authentication_request(user_id=user['id'], password=user['password'], project_id=project['id'])
    resource_url = '/users'
    r = self.get(resource_url, auth=dom_auth)
    self.assertValidUserListResponse(r, ref=user, resource_url=resource_url)
    resource_url = '/users'
    r = self.get(resource_url, auth=project_auth)
    self.assertValidUserListResponse(r, ref=user, resource_url=resource_url)
    resource_url = ('/users?domain_id=%(domain_id)s' % {'domain_id': domain['id']})
    r = self.get(resource_url)
    self.assertValidUserListResponse(r, ref=user, resource_url=resource_url)
