'Ensure an exception is raised when the auth_uri cannot be obtained.
Ensure an exception is raised when the auth_uri cannot be obtained
from any source.'

def test_keystone_v3_endpoint_not_set_in_config(self):

    policy_check = 'heat.common.policy.Enforcer.check_is_admin'
    with mock.patch(policy_check) as pc:
        pc.return_value = False
        ctx = context.RequestContext(auth_url=None)
        self.assertRaises(exception.AuthorizationFailure, getattr, ctx, 'keystone_v3_endpoint')
