Skip to content

Commit 8e1c663

Browse files
committed
tests: add mock
1 parent 9c9bb59 commit 8e1c663

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

Diff for: tests/modules/accounting/bunker/test_bunker.py

+4
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,7 @@ def test_true_when_cl_rebase_is_negative(
5151
is_high_midterm_slashing_penalty: Mock,
5252
) -> None:
5353
bunker.w3.lido_contracts.get_accounting_last_processing_ref_slot = Mock(return_value=ref_blockstamp)
54+
bunker.w3.cc.get_config_spec = Mock()
5455
bunker.get_cl_rebase_for_current_report = Mock(return_value=-1)
5556

5657
result = bunker.is_bunker_mode(
@@ -79,6 +80,7 @@ def test_true_when_high_midterm_slashing_penalty(
7980
is_abnormal_cl_rebase: Mock,
8081
) -> None:
8182
bunker.w3.lido_contracts.get_accounting_last_processing_ref_slot = Mock(return_value=ref_blockstamp)
83+
bunker.w3.cc.get_config_spec = Mock()
8284
bunker.get_cl_rebase_for_current_report = Mock(return_value=0)
8385
is_high_midterm_slashing_penalty.return_value = True
8486
result = bunker.is_bunker_mode(
@@ -105,6 +107,7 @@ def test_true_when_abnormal_cl_rebase(
105107
is_abnormal_cl_rebase: Mock,
106108
) -> None:
107109
bunker.w3.lido_contracts.get_accounting_last_processing_ref_slot = Mock(return_value=ref_blockstamp)
110+
bunker.w3.cc.get_config_spec = Mock()
108111
bunker.get_cl_rebase_for_current_report = Mock(return_value=0)
109112
is_high_midterm_slashing_penalty.return_value = False
110113
is_abnormal_cl_rebase.return_value = True
@@ -133,6 +136,7 @@ def test_no_bunker_mode_by_default(
133136
is_abnormal_cl_rebase: Mock,
134137
) -> None:
135138
bunker.w3.lido_contracts.get_accounting_last_processing_ref_slot = Mock(return_value=ref_blockstamp)
139+
bunker.w3.cc.get_config_spec = Mock()
136140
bunker.get_cl_rebase_for_current_report = Mock(return_value=0)
137141
is_high_midterm_slashing_penalty.return_value = False
138142
is_abnormal_cl_rebase.return_value = False

0 commit comments

Comments
 (0)