def test_section_authorized_xauth(self): if self.user_cred and self.server: cloud_session = WolframCloudSession(credentials=self.user_cred, server=self.server) cloud_session.start() self.assertEqual(cloud_session.authorized(), True) self.assertEqual(cloud_session.anonymous(), False) else: print("xauth not available. Test skipped.")
def test_bad_sak(self): bad_sak = SecuredAuthenticationKey("foo", "bar") with self.assertRaises(AuthenticationException): cloud_session = WolframCloudSession(credentials=bad_sak, server=self.server) cloud_session.start()
def test_section_authorized_oauth(self): cloud_session = WolframCloudSession(credentials=self.sak, server=self.server) cloud_session.start() self.assertEqual(cloud_session.authorized(), True) self.assertEqual(cloud_session.anonymous(), False)