File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -478,13 +478,26 @@ def testFaults(run_cli, backends):
478478def test_login_stubs (backends ):
479479 bz = _open_bz (REDHAT_URL , ** backends )
480480
481- # Failed login, verifies our backends are calling the correct API
481+ # In 2024 bugzilla.redhat.com disabled User.login and User.logout APIs
482+ # for xmlrpc API
483+
482484 with pytest .raises (bugzilla .BugzillaError ) as e :
483485 bz .login ("foo" , "bar" )
484486 assert "Login failed" in str (e )
485487
486- # Works fine when not logged in
487- bz .logout ()
488+ is_rest = bz .is_rest ()
489+ is_xmlrpc = bz .is_xmlrpc ()
490+
491+ msg = None
492+ try :
493+ bz .logout ()
494+ except Exception as error :
495+ msg = str (error )
496+
497+ if is_rest and msg :
498+ raise AssertionError ("didn't expect exception: %s" % msg )
499+ if is_xmlrpc :
500+ assert "'User.logout' was not found" in str (msg )
488501
489502
490503def test_redhat_version (backends ):
You can’t perform that action at this time.
0 commit comments