Reformat with black
This commit is contained in:
@@ -15,15 +15,15 @@ class TestInfoCommands:
|
||||
mock_info_data = {
|
||||
"version": "1.23.0",
|
||||
"hostname": "kuma-server",
|
||||
"primaryBaseURL": "https://status.example.com"
|
||||
"primaryBaseURL": "https://status.example.com",
|
||||
}
|
||||
mock_client.api.info.return_value = mock_info_data
|
||||
|
||||
|
||||
info_commands = InfoCommands(mock_client)
|
||||
|
||||
|
||||
# Execute
|
||||
info_commands.get_info()
|
||||
|
||||
|
||||
# Verify
|
||||
mock_client.api.info.assert_called_once()
|
||||
captured = capsys.readouterr()
|
||||
@@ -36,12 +36,12 @@ class TestInfoCommands:
|
||||
"""Test info command with empty response"""
|
||||
# Setup
|
||||
mock_client.api.info.return_value = None
|
||||
|
||||
|
||||
info_commands = InfoCommands(mock_client)
|
||||
|
||||
|
||||
# Execute
|
||||
info_commands.get_info()
|
||||
|
||||
|
||||
# Verify
|
||||
mock_client.api.info.assert_called_once()
|
||||
captured = capsys.readouterr()
|
||||
@@ -51,12 +51,12 @@ class TestInfoCommands:
|
||||
"""Test info command with API error"""
|
||||
# Setup
|
||||
mock_client.api.info.side_effect = Exception("Connection failed")
|
||||
|
||||
|
||||
info_commands = InfoCommands(mock_client)
|
||||
|
||||
|
||||
# Execute
|
||||
info_commands.get_info()
|
||||
|
||||
|
||||
# Verify
|
||||
mock_client.api.info.assert_called_once()
|
||||
captured = capsys.readouterr()
|
||||
@@ -70,10 +70,10 @@ class TestInfoCommandHandler:
|
||||
mock_args = Mock()
|
||||
mock_info_data = {"version": "1.23.0"}
|
||||
mock_client.api.info.return_value = mock_info_data
|
||||
|
||||
|
||||
# Execute
|
||||
result = handle_info_command(mock_args, mock_client)
|
||||
|
||||
|
||||
# Verify
|
||||
assert result is True
|
||||
mock_client.api.info.assert_called_once()
|
||||
@@ -83,10 +83,10 @@ class TestInfoCommandHandler:
|
||||
# Setup
|
||||
mock_args = Mock()
|
||||
mock_client.api.info.side_effect = Exception("API Error")
|
||||
|
||||
|
||||
# Execute
|
||||
result = handle_info_command(mock_args, mock_client)
|
||||
|
||||
|
||||
# Verify
|
||||
assert result is True # Handler always returns True
|
||||
mock_client.api.info.assert_called_once()
|
||||
mock_client.api.info.assert_called_once()
|
||||
|
Reference in New Issue
Block a user