'Test deleting a user grant revokes token.
Test Plan:
- Get a token for user, scoped to Project
- Delete the grant user has on Project
- Check token is no longer valid'

def test_deleting_user_grant_revokes_token(self):

    auth_data = self.build_authentication_request(user_id=self.user['id'], password=self.user['password'], project_id=self.project['id'])
    token = self.get_requested_token(auth_data)
    self.head('/auth/tokens', headers={'X-Subject-Token': token}, expected_status=http_client.OK)
    grant_url = ('/projects/%(project_id)s/users/%(user_id)s/roles/%(role_id)s' % {'project_id': self.project['id'], 'user_id': self.user['id'], 'role_id': self.role['id']})
    self.delete(grant_url)
    self.head('/auth/tokens', token=token, expected_status=http_client.UNAUTHORIZED)
