'Test that using a federation token with v2 auth fails.
If an admin sets up a federated Keystone environment, and a user
incorrectly configures a service (like Nova) to only use v2 auth, the
returned message should be informative.'

def test_v2_auth_with_federation_token_fails(self):

    r = self._issue_unscoped_token()
    token_id = r.headers.get('X-Subject-Token')
    v2_token_controller = token_controller.Auth()
    self.assertRaises(exception.Unauthorized, v2_token_controller.validate_token, self.make_request(is_admin=True), token_id)
