'Test getting ec2 credential error path.'

def test_get_ec2_keypair_error(self):

    ctx = utils.dummy_context()
    self.patchobject(ctx, '_create_auth_plugin')
    ctx.trust_id = None
    heat_ks_client = heat_keystoneclient.KeystoneClient(ctx)
    self.assertRaises(ValueError, heat_ks_client.get_ec2_keypair)
