Fix tests after refactor
This commit is contained in:
@@ -49,8 +49,10 @@ class TestInfoCommands:
|
||||
|
||||
def test_get_info_api_error(self, mock_client, capsys):
|
||||
"""Test info command with API error"""
|
||||
from uptime_kuma_api import UptimeKumaException
|
||||
|
||||
# Setup
|
||||
mock_client.api.info.side_effect = Exception("Connection failed")
|
||||
mock_client.api.info.side_effect = UptimeKumaException("Connection failed")
|
||||
|
||||
info_commands = InfoCommands(mock_client)
|
||||
|
||||
@@ -80,9 +82,11 @@ class TestInfoCommandHandler:
|
||||
|
||||
def test_handle_info_command_with_error(self, mock_client):
|
||||
"""Test info command handler with error"""
|
||||
from uptime_kuma_api import UptimeKumaException
|
||||
|
||||
# Setup
|
||||
mock_args = Mock()
|
||||
mock_client.api.info.side_effect = Exception("API Error")
|
||||
mock_client.api.info.side_effect = UptimeKumaException("API Error")
|
||||
|
||||
# Execute
|
||||
result = handle_info_command(mock_args, mock_client)
|
||||
|
Reference in New Issue
Block a user