def test_invalid_discharge_raises_exception(self): conf = config.Config() conf.set('macaroon', pymacaroons.Macaroon().serialize()) conf.set('unbound_discharge', 'inval*id') conf.save() with self.assertRaises(errors.InvalidCredentialsError): storeapi._macaroon_auth(conf)
def test_invalid_macaroon_root_raises_exception(self): conf = config.Config() conf.set('macaroon', 'inval"id') conf.save() with self.assertRaises(errors.InvalidCredentialsError): storeapi._macaroon_auth(conf)