From 30be1922e75367c4cf9095b96569e336b31eafe3 Mon Sep 17 00:00:00 2001 From: yanpliu Date: Thu, 26 Sep 2024 23:14:27 -0400 Subject: [PATCH] update subscription_status_label to subscription_facet_attribute --- tests/upgrades/test_virtwho.py | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/tests/upgrades/test_virtwho.py b/tests/upgrades/test_virtwho.py index d3c08d3ea9a..98d4bf6ee1e 100644 --- a/tests/upgrades/test_virtwho.py +++ b/tests/upgrades/test_virtwho.py @@ -136,14 +136,18 @@ def test_post_crud_virt_who_configuration(self, form_data, pre_upgrade_data, tar # Vefify the connection of the guest on Content host hypervisor_name = pre_upgrade_data.get('hypervisor_name') guest_name = pre_upgrade_data.get('guest_name') - hosts = [hypervisor_name, guest_name] - for hostname in hosts: - result = ( - target_sat.api.Host(organization=org_id) - .search(query={'search': hostname})[0] - .read_json() - ) - assert result['subscription_status_label'] == 'Simple Content Access' + result = ( + target_sat.api.Host(organization=org_id) + .search(query={'search': hypervisor_name})[0] + .read_json() + ) + assert result['subscription_facet_attributes']['virtual_guests'][0]['name'] == guest_name + result = ( + target_sat.api.Host(organization=org_id) + .search(query={'search': guest_name})[0] + .read_json() + ) + assert hypervisor_name in result['subscription_facet_attributes']['virtual_host']['name'] # Verify the virt-who config-file exists. config_file = get_configure_file(vhd.id)