From bc7633f5f64bf285685beda15c23ad78e8262ec8 Mon Sep 17 00:00:00 2001 From: Satellite QE <115476073+Satellite-QE@users.noreply.github.com> Date: Fri, 13 Oct 2023 05:00:55 -0400 Subject: [PATCH] [6.12.z] Fix Puppet tests (#12899) --- robottelo/hosts.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/robottelo/hosts.py b/robottelo/hosts.py index bb63d79f47e..5d7b48438a6 100644 --- a/robottelo/hosts.py +++ b/robottelo/hosts.py @@ -1862,7 +1862,7 @@ def delete_puppet_class(self, puppetclass_name): for hostgroup in puppet_class.read().hostgroup: hostgroup.delete_puppetclass(data={'puppetclass_id': puppet_class.id}) # Search and remove puppet class from affected hosts - for host in self.api.Host().search(query={'search': f'class={puppet_class.name}'}): + for host in self.api.Host(puppetclass=f'{puppet_class.name}').search(): host.delete_puppetclass(data={'puppetclass_id': puppet_class.id}) # Remove puppet class entity puppet_class.delete()