From bea1a351652a4663f2dd28e131d8e93c346a3bd8 Mon Sep 17 00:00:00 2001 From: badrogger Date: Tue, 8 Oct 2024 16:58:01 +0000 Subject: [PATCH] Fix test_run_monitor_for_schain_left test --- tests/schains/monitor/main_test.py | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/tests/schains/monitor/main_test.py b/tests/schains/monitor/main_test.py index 865fe081..f637b4c9 100644 --- a/tests/schains/monitor/main_test.py +++ b/tests/schains/monitor/main_test.py @@ -83,13 +83,14 @@ def test_run_monitor_for_schain_left( ): schain_not_exists = 'not-on-node' upsert_schain_record(schain_not_exists) - with mock.patch('core.schains.monitor.main.keep_tasks_running') as keep_tasks_running_mock: - run_monitor_for_schain( - skale, - skale_ima, - node_config, - get_schain_struct(schain_name=schain_db), - dutils=dutils, - once=True - ) - keep_tasks_running_mock.assert_not_called() + with mock.patch('core.schains.monitor.main.is_node_part_of_chain', return_value=False): + with mock.patch('core.schains.monitor.main.keep_tasks_running') as keep_tasks_running_mock: + run_monitor_for_schain( + skale, + skale_ima, + node_config, + get_schain_struct(schain_name=schain_not_exists), + dutils=dutils, + once=True + ) + keep_tasks_running_mock.assert_not_called()