示例#1
0
 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)
示例#2
0
 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)
示例#3
0
 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)
示例#4
0
 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)