Add kerberos debug message

Fixes: https://pagure.io/koji/issue/2063
This commit is contained in:
Jana Cupova 2021-04-21 10:01:54 +02:00 committed by Tomas Kopecek
parent cc172ff2cf
commit de008b5f27
4 changed files with 36 additions and 7 deletions

View file

@ -82,7 +82,7 @@ class TestGSSAPI(unittest.TestCase):
def test_gssapi_login_error(self):
old_environ = dict(**os.environ)
self.session._callMethod.side_effect = Exception('login failed')
with self.assertRaises(koji.AuthError):
with self.assertRaises(koji.GSSAPIAuthError):
self.session.gssapi_login()
self.session._callMethod.assert_called_once_with('sslLogin', [None],
retry=False)
@ -101,7 +101,7 @@ class TestGSSAPI(unittest.TestCase):
# failed gssapi auth should leave the url alone
self.session.baseurl = url1
self.session._callMethod.side_effect = Exception('login failed')
with self.assertRaises(koji.AuthError):
with self.assertRaises(koji.GSSAPIAuthError):
self.session.gssapi_login()
self.assertEqual(self.session.baseurl, url1)
self.assertEqual(old_environ, dict(**os.environ))