'GET /groups?domain_id=mydomain&name=myname (protected).
Test Plan:
- Update policy to protect api by domain_id
- List groups using a token scoped to domainA with a filter
specifying both domainA and the name of group.
- We should only get back the group in domainA that matches
the name'

def test_list_groups_protected_by_domain_and_filtered(self):

    new_policy = {'identity:list_groups': ['domain_id:%(domain_id)s']}
    self._set_policy(new_policy)
    self.auth = self.build_authentication_request(user_id=self.user1['id'], password=self.user1['password'], domain_id=self.domainA['id'])
    url_by_name = ('/groups?domain_id=%s&name=%s' % (self.domainA['id'], self.group2['name']))
    r = self.get(url_by_name, auth=self.auth)
    id_list = self._get_id_list_from_ref_list(r.result.get('groups'))
    self.assertEqual(1, len(id_list))
    self.assertIn(self.group2['id'], id_list)
