From 9d236e9e41a5a0ed77cc8a2377d1012fcf63f538 Mon Sep 17 00:00:00 2001 From: Satellite QE <115476073+Satellite-QE@users.noreply.github.com> Date: Thu, 9 May 2024 11:56:49 -0400 Subject: [PATCH] [6.12.z] fix typo in test_host (#15016) fix typo in test_host (#15013) (cherry picked from commit db62d33d9852a16881b51ac1d67870202b369ab6) Co-authored-by: Peter Ondrejka --- tests/foreman/cli/test_host.py | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/tests/foreman/cli/test_host.py b/tests/foreman/cli/test_host.py index 5b75e75db53..55482689e7a 100644 --- a/tests/foreman/cli/test_host.py +++ b/tests/foreman/cli/test_host.py @@ -358,13 +358,13 @@ def test_positive_crud_interface_by_id(target_sat, default_location, default_org mac = gen_mac(multicast=False) host = target_sat.cli_factory.make_fake_host({'domain-id': domain.id}) - number_of_interfaces = len(target_sat.cliHostInterface.list({'host-id': host['id']})) + number_of_interfaces = len(target_sat.cli.HostInterface.list({'host-id': host['id']})) - target_sat.cliHostInterface.create( + target_sat.cli.HostInterface.create( {'host-id': host['id'], 'domain-id': domain.id, 'mac': mac, 'type': 'interface'} ) host = target_sat.cli.Host.info({'id': host['id']}) - host_interface = target_sat.cliHostInterface.info( + host_interface = target_sat.cli.HostInterface.info( { 'host-id': host['id'], 'id': [ni for ni in host['network-interfaces'] if ni['mac-address'] == mac][0]['id'], @@ -373,14 +373,14 @@ def test_positive_crud_interface_by_id(target_sat, default_location, default_org assert host_interface['domain'] == domain.name assert host_interface['mac-address'] == mac assert ( - len(target_sat.cliHostInterface.list({'host-id': host['id']})) == number_of_interfaces + 1 + len(target_sat.cli.HostInterface.list({'host-id': host['id']})) == number_of_interfaces + 1 ) new_domain = target_sat.api.Domain( location=[default_location], organization=[default_org] ).create() new_mac = gen_mac(multicast=False) - target_sat.cliHostInterface.update( + target_sat.cli.HostInterface.update( { 'host-id': host['id'], 'id': host_interface['id'], @@ -388,7 +388,7 @@ def test_positive_crud_interface_by_id(target_sat, default_location, default_org 'mac': new_mac, } ) - host_interface = target_sat.cliHostInterface.info( + host_interface = target_sat.cli.HostInterface.info( { 'host-id': host['id'], 'id': [ni for ni in host['network-interfaces'] if ni['mac-address'] == mac][0]['id'], @@ -397,10 +397,10 @@ def test_positive_crud_interface_by_id(target_sat, default_location, default_org assert host_interface['domain'] == new_domain.name assert host_interface['mac-address'] == new_mac - target_sat.cliHostInterface.delete({'host-id': host['id'], 'id': host_interface['id']}) - assert len(target_sat.cliHostInterface.list({'host-id': host['id']})) == number_of_interfaces + target_sat.cli.HostInterface.delete({'host-id': host['id'], 'id': host_interface['id']}) + assert len(target_sat.cli.HostInterface.list({'host-id': host['id']})) == number_of_interfaces with pytest.raises(CLIReturnCodeError): - target_sat.cliHostInterface.info({'host-id': host['id'], 'id': host_interface['id']}) + target_sat.cli.HostInterface.info({'host-id': host['id'], 'id': host_interface['id']}) @pytest.mark.cli_host_create