Skip to content

Commit

Permalink
Fix host-collections tests (#13442)
Browse files Browse the repository at this point in the history
  • Loading branch information
vsedmik authored Dec 13, 2023
1 parent c406a3d commit 447f218
Showing 1 changed file with 6 additions and 8 deletions.
14 changes: 6 additions & 8 deletions tests/foreman/cli/test_hostcollection.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,15 +30,13 @@
)


def _make_fake_host_helper(module_org, module_target_sat):
def _make_fake_host_helper(module_org, sat):
"""Make a new fake host"""
library = module_target_sat.cli.LifecycleEnvironment.info(
library = sat.cli.LifecycleEnvironment.info(
{'organization-id': module_org.id, 'name': ENVIRONMENT}
)
default_cv = module_target_sat.cli.ContentView.info(
{'organization-id': module_org.id, 'name': DEFAULT_CV}
)
return module_target_sat.cli_factory.make_fake_host(
default_cv = sat.cli.ContentView.info({'organization-id': module_org.id, 'name': DEFAULT_CV})
return sat.cli_factory.make_fake_host(
{
'content-view-id': default_cv['id'],
'lifecycle-environment-id': library['id'],
Expand Down Expand Up @@ -262,7 +260,7 @@ def test_positive_host_collection_host_pagination(module_org, module_target_sat)
{'organization-id': module_org.id}
)
host_ids = ','.join(
_make_fake_host_helper((module_org)['id'] for _ in range(2)), module_target_sat
_make_fake_host_helper(module_org, module_target_sat)['id'] for _ in range(2)
)
module_target_sat.cli.HostCollection.add_host(
{'host-ids': host_ids, 'id': host_collection['id']}
Expand Down Expand Up @@ -316,7 +314,7 @@ def test_positive_register_host_ak_with_host_collection(module_org, module_ak_wi
:CaseLevel: System
"""
host_info = _make_fake_host_helper(module_org)
host_info = _make_fake_host_helper(module_org, target_sat)

hc = target_sat.cli_factory.make_host_collection({'organization-id': module_org.id})
target_sat.cli.ActivationKey.add_host_collection(
Expand Down

0 comments on commit 447f218

Please sign in to comment.