def test_duo_auth_enroll_invalid_other_api_error(self): result = duo_auth_enroll('integration_key', 'secret_key', 'host', 'username') self.assertTrue('error' in result) self.assertEqual(result['error'], 'Other API Error')
def test_duo_auth_enroll_invalid_duo_offline(self): result = duo_auth_enroll('integration_key', 'secret_key', 'host', 'username') self.assertTrue('error' in result) self.assertEqual(result['error'], 'Duo offline. Try again later.')
def test_duo_auth_enroll_username_already_exists(self): result = duo_auth_enroll('integration_key', 'secret_key', 'host', 'username') self.assertTrue('error' in result) self.assertEqual(result['error'], 'Username already exists in Duo.')
def test_duo_auth_enroll_invalid_secret_key(self): result = duo_auth_enroll('integration_key', 'secret_key', 'host', 'username') self.assertTrue('error' in result) self.assertEqual(result['error'], 'Invalid secret key')
def test_duo_auth_enroll_invalid_cert(self): result = duo_auth_enroll('integration_key', 'secret_key', 'host', 'username') self.assertTrue('error' in result) self.assertEqual(result['error'], 'Host incorrect: SSL Certificate Error')
def test_duo_auth_enroll_invalid_host(self): result = duo_auth_enroll('integration_key', 'secret_key', 'host', 'username') self.assertTrue('error' in result) self.assertEqual(result['error'], 'Host incorrect: Could not be found')
def test_duo_auth_check_success(self): result = duo_auth_enroll('integration_key', 'secret_key', 'host', 'username') self.assertTrue('time' in result)