Esempio n. 1
0
 def test_user_preauth_returns_something(self):
     c = AccountRESTClient(self.HOST, preauth_key=self.ph_key_domain1)
     token = c.get_preauth_token(self.lambda_account.name)
     self.assertIsInstance(token, str)
Esempio n. 2
0
 def test_user_preauth_with_wrong_user_fails(self):
     with self.assertRaises(RESTClient.RESTBackendError):
         c = AccountRESTClient(self.HOST, preauth_key=self.ph_key_domain1)
         c.get_preauth_token('idonotexist1234@'+TEST_CONF['domain_1'])
Esempio n. 3
0
 def test_user_preauth_without_key_fails(self):
     with self.assertRaises(RESTClient.NoPreauthKeyProvided):
         c = AccountRESTClient(self.HOST)
         c.get_preauth_token(self.lambda_account.name)