Refactor test error handling and status updates in HostsManagerApp tests
This commit is contained in:
parent
8346e0e362
commit
cd6820179f
2 changed files with 30 additions and 32 deletions
|
@ -279,7 +279,9 @@ class TestSaveConfirmationIntegration:
|
|||
"""Test exit_edit_entry_mode cleans up properly."""
|
||||
app.entry_edit_mode = True
|
||||
app.original_entry_values = {"test": "data"}
|
||||
app.update_entry_details = Mock()
|
||||
|
||||
# Mock the details_handler and query_one methods
|
||||
app.details_handler.update_entry_details = Mock()
|
||||
app.query_one = Mock()
|
||||
app.update_status = Mock()
|
||||
|
||||
|
@ -290,6 +292,6 @@ class TestSaveConfirmationIntegration:
|
|||
|
||||
assert not app.entry_edit_mode
|
||||
assert app.original_entry_values is None
|
||||
app.update_entry_details.assert_called_once()
|
||||
app.details_handler.update_entry_details.assert_called_once()
|
||||
mock_table.focus.assert_called_once()
|
||||
app.update_status.assert_called_once_with("Exited entry edit mode")
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue