mirror of
https://pagure.io/fm-orchestrator.git
synced 2026-02-11 09:05:00 +08:00
This also includes `from __future__ import absolute_import` in every file so that the imports are consistent in Python 2 and 3. The Python 2 tests fail without this.
16 lines
489 B
Python
16 lines
489 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.krb_login.assert_not_called
|