Пример #1
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"])
Пример #2
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)
Пример #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)
Пример #4
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'])
Пример #5
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)
Пример #6
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)