From c0c5c34b90ec24a672bae5147103181ecbf57286 Mon Sep 17 00:00:00 2001 From: dosas Date: Thu, 21 Mar 2024 10:46:49 +0100 Subject: [PATCH] Fix content_facet_attributes attributes (#14224) (cherry picked from commit b05da4ee3c6a046c22f73c41938d56f3fb556024) --- tests/foreman/api/test_host.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/tests/foreman/api/test_host.py b/tests/foreman/api/test_host.py index 94730d56925..eb3e89dc6aa 100644 --- a/tests/foreman/api/test_host.py +++ b/tests/foreman/api/test_host.py @@ -261,10 +261,10 @@ def test_positive_create_inherit_lce_cv( ).create() host = module_target_sat.api.Host(hostgroup=hostgroup, organization=module_org).create() assert ( - host.content_facet_attributes['lifecycle_environment_id'] + host.content_facet_attributes['lifecycle_environment']['id'] == hostgroup.lifecycle_environment.id ) - assert host.content_facet_attributes['content_view_id'] == hostgroup.content_view.id + assert host.content_facet_attributes['content_view']['id'] == hostgroup.content_view.id @pytest.mark.tier2 @@ -625,16 +625,16 @@ def test_positive_create_and_update_with_content_view( 'lifecycle_environment_id': module_lce_library.id, }, ).create() - assert host.content_facet_attributes['content_view_id'] == module_default_org_view.id - assert host.content_facet_attributes['lifecycle_environment_id'] == module_lce_library.id + assert host.content_facet_attributes['content_view']['id'] == module_default_org_view.id + assert host.content_facet_attributes['lifecycle_environment']['id'] == module_lce_library.id host.content_facet_attributes = { 'content_view_id': module_default_org_view.id, 'lifecycle_environment_id': module_lce_library.id, } host = host.update(['content_facet_attributes']) - assert host.content_facet_attributes['content_view_id'] == module_default_org_view.id - assert host.content_facet_attributes['lifecycle_environment_id'] == module_lce_library.id + assert host.content_facet_attributes['content_view']['id'] == module_default_org_view.id + assert host.content_facet_attributes['lifecycle_environment']['id'] == module_lce_library.id @pytest.mark.tier1