Files
fm-orchestrator/tests/test_common/test_koji.py
Mike McLean f6dcf6c346 switch to using gssapi_login for koji
Fixes https://pagure.io/fm-orchestrator/issue/1777

koji recently dropped this old call
https://pagure.io/koji/pull-request/3599

Previously, koji was ignoring the ctx arg and wrapping gssapi_login,
so this change is completely equivalent to the old behavior.
2023-02-22 10:22:53 -05:00

16 lines
492 B
Python

# -*- coding: utf-8 -*-
# SPDX-License-Identifier: MIT
from __future__ import absolute_import
import mock
from module_build_service.common.koji import get_session
@mock.patch("koji.ClientSession")
def test_get_anonymous_session(mock_session):
mbs_config = mock.Mock(koji_profile="koji", koji_config="conf/koji.conf")
session = get_session(mbs_config, login=False)
assert mock_session.return_value == session
assert mock_session.return_value.gssapi_login.assert_not_called