Skip to content

Commit

Permalink
Iproving coverage
Browse files Browse the repository at this point in the history
  • Loading branch information
rameshraghupathy committed Dec 13, 2024
1 parent ddf4541 commit 3e2114f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tests/process-reboot-cause_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -97,8 +97,8 @@ def test_get_sorted_reboot_cause_files_error(self, mock_listdir):
self.assertEqual(result, [])

# Test update_dpu_reboot_cause_to_chassis_state_db
@patch("builtins.open", new_callable=mock_open, read_data='{"cause": "Non-Hardware", "comment": " Switch rebooted DPU\\n", "device": "DPU0", "time": "Fri Dec 13 01:12:36 AM UTC 2024", "name": "2024_12_13_01_12_36"}')
@patch("process_reboot_cause.SonicV2Connector")
@patch("builtins.open", new_callable=mock_open, read_data='{"cause": "Non-Hardware", "comment": "Switch rebooted DPU", "device": "DPU0", "time": "Fri Dec 13 01:12:36 AM UTC 2024", "name": "2024_12_13_01_12_36"}')
@patch("process_reboot_cause.swsscommon.SonicV2Connector")
def test_update_dpu_reboot_cause_to_chassis_state_db_update(self, mock_connector, mock_open):
# Mock the database connection
mock_db = MagicMock()
Expand Down

0 comments on commit 3e2114f

Please sign in to comment.