예제 #1
0
파일: test_REST.py 프로젝트: zacbri/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)
예제 #2
0
파일: test_REST.py 프로젝트: zacbri/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'])
예제 #3
0
파일: test_REST.py 프로젝트: zacbri/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)