'Test add/removal to/from group revokes token.
Test Plan:
- Get a token for user1, scoped to ProjectA
- Get a token for user2, scoped to ProjectA
- Remove user1 from group1
- Check token for user1 is no longer valid
- Check token for user2 is still valid, even though
user2 is also part of group1
- Add user2 to group2
- Check token for user2 is now no longer valid'

def test_group_membership_changes_revokes_token(self):

    auth_data = self.build_authentication_request(user_id=self.user1['id'], password=self.user1['password'], project_id=self.projectA['id'])
    token1 = self.get_requested_token(auth_data)
    auth_data = self.build_authentication_request(user_id=self.user2['id'], password=self.user2['password'], project_id=self.projectA['id'])
    token2 = self.get_requested_token(auth_data)
    self.head('/auth/tokens', headers={'X-Subject-Token': token1}, expected_status=http_client.OK)
    self.head('/auth/tokens', headers={'X-Subject-Token': token2}, expected_status=http_client.OK)
    self.delete(('/groups/%(group_id)s/users/%(user_id)s' % {'group_id': self.group1['id'], 'user_id': self.user1['id']}))
    self.head('/auth/tokens', headers={'X-Subject-Token': token1}, expected_status=http_client.NOT_FOUND)
    self.head('/auth/tokens', headers={'X-Subject-Token': token2}, expected_status=http_client.OK)
    self.put(('/groups/%(group_id)s/users/%(user_id)s' % {'group_id': self.group2['id'], 'user_id': self.user2['id']}))
    self.head('/auth/tokens', headers={'X-Subject-Token': token2}, expected_status=http_client.OK)
