Skip to content

Commit

Permalink
Fix content_facet_attributes attributes (#14224)
Browse files Browse the repository at this point in the history
  • Loading branch information
dosas authored Mar 21, 2024
1 parent 59164b5 commit b05da4e
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions tests/foreman/api/test_host.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit b05da4e

Please sign in to comment.