Skip to content

Commit

Permalink
[6.12.z] Fix Puppet tests (#12899)
Browse files Browse the repository at this point in the history
  • Loading branch information
Satellite-QE authored Oct 13, 2023
1 parent 8383b32 commit bc7633f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion robottelo/hosts.py
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down

0 comments on commit bc7633f

Please sign in to comment.