Esempio n. 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)
Esempio n. 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)
Esempio n. 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)
Esempio n. 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)