コード例 #1
0
ファイル: test_REST.py プロジェクト: emillion/zimsoap
 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
ファイル: test_REST.py プロジェクト: emillion/zimsoap
 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
ファイル: test_REST.py プロジェクト: emillion/zimsoap
 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)