Skip to content

Commit

Permalink
checkrhui(tests): fix tests not mocking api.get_common_folder_path
Browse files Browse the repository at this point in the history
  • Loading branch information
mhecko committed Apr 9, 2023
1 parent ac9e71f commit 15c465f
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ def create_amazon_id_dnf_plugin_copy_task():


def produce_rhui_info_for_provider(provider):
if not provider:
return
upgrade_path = rhui.get_upg_path()

cloud_map_entry = rhui.RHUI_CLOUD_MAP[upgrade_path][provider]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

from leapp.libraries.common import rhsm
from leapp.libraries.common.config import mock_configs
from leapp.libraries.stdlib import api
from leapp.models import (
InstalledRedHatSignedRPM,
InstalledRPM,
Expand Down Expand Up @@ -51,6 +52,7 @@ def test_check_rhui_actor(
monkeypatch, current_actor_context, skip_rhsm, msgs_received, installed_rpms
):
monkeypatch.setattr(rhsm, 'skip_rhsm', lambda: skip_rhsm)
monkeypatch.setattr(api, 'get_common_folder_path', lambda dummy: '/commons')

current_actor_context.feed(create_modulesfacts(installed_rpm=installed_rpms))
current_actor_context.run(config_model=mock_configs.CONFIG)
Expand Down

0 comments on commit 15c465f

Please sign in to comment.