Skip to content

Commit

Permalink
Fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
badrogger committed Oct 8, 2024
1 parent bea1a35 commit 38a15cd
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions tests/routes/node_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -267,13 +267,13 @@ def test_update_safe(skale, schain_on_contracts, schain_config, upstreams, skale
assert data['payload'] == {'update_safe': True, 'unsafe_chains': []}

with mock.patch('web.helper.init_skale', return_value=skale):
skale.node_rotation.is_rotation_active = mock.Mock(return_value=True)
data = get_bp_data(
skale_bp,
get_api_url(BLUEPRINT_NAME, 'update-safe'),
)

assert data['payload'] == {'update_safe': False, 'unsafe_chains': [schain_on_contracts]}
with mock.patch.object(skale.node_rotation, 'is_rotation_active', return_value=False):
skale.node_rotation.is_rotation_active = mock.Mock(return_value=True)
data = get_bp_data(
skale_bp,
get_api_url(BLUEPRINT_NAME, 'update-safe'),
)
assert data['payload'] == {'update_safe': False, 'unsafe_chains': [schain_on_contracts]}

cfm = ConfigFileManager(schain_on_contracts)

Expand Down

0 comments on commit 38a15cd

Please sign in to comment.