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')