diff --git a/tests/foreman/api/test_parameters.py b/tests/foreman/api/test_parameters.py index 5d70374a546..1a1edf039fa 100644 --- a/tests/foreman/api/test_parameters.py +++ b/tests/foreman/api/test_parameters.py @@ -41,7 +41,6 @@ def test_positive_parameter_precedence_impact( cp = module_target_sat.api.CommonParameter(name=param_name, value=param_value).create() request.addfinalizer(cp.delete) host = module_target_sat.api.Host(organization=module_org, location=module_location).create() - request.addfinalizer(host.delete) result = [res for res in host.all_parameters if res['name'] == param_name] assert result[0]['name'] == param_name assert result[0]['associated_type'] == 'global' @@ -51,6 +50,7 @@ def test_positive_parameter_precedence_impact( group_parameters_attributes=[{'name': param_name, 'value': param_value}], ).create() request.addfinalizer(hg.delete) + request.addfinalizer(host.delete) host.hostgroup = hg host = host.update(['hostgroup']) result = [res for res in host.all_parameters if res['name'] == param_name]