mirror of
https://pagure.io/fm-orchestrator.git
synced 2026-02-03 05:03:43 +08:00
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.
16 lines
492 B
Python
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
|