From dd5f3d2ccc2e7263512a03c54f9026cd544b5b16 Mon Sep 17 00:00:00 2001
From: Peter Ondrejka <pondrejk@users.noreply.github.com>
Date: Fri, 15 Mar 2024 11:16:07 +0100
Subject: [PATCH] Update tests/foreman/destructive/test_capsule_loadbalancer.py

Co-authored-by: Gaurav Talreja <gauravtalreja1@gmail.com>
---
 tests/foreman/destructive/test_capsule_loadbalancer.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tests/foreman/destructive/test_capsule_loadbalancer.py b/tests/foreman/destructive/test_capsule_loadbalancer.py
index f448e36320f..b987f756a91 100644
--- a/tests/foreman/destructive/test_capsule_loadbalancer.py
+++ b/tests/foreman/destructive/test_capsule_loadbalancer.py
@@ -220,7 +220,7 @@ def test_loadbalancer_install_package(
         if loadbalancer_setup['setup_capsules']['capsule_1'].hostname in result.stdout
         else loadbalancer_setup['setup_capsules']['capsule_2']
     )
-    request.addfinalizer(registered_to_capsule.power_control(state=VmState.RUNNING, ensure=True))
+    request.addfinalizer(lambda: registered_to_capsule.power_control(state=VmState.RUNNING, ensure=True))
 
     # Remove the packages from the client
     result = rhel7_contenthost.execute('yum remove -y tree')