Skip to content

Commit

Permalink
Fixing test failure
Browse files Browse the repository at this point in the history
  • Loading branch information
rameshraghupathy committed Oct 23, 2024
1 parent 667ec45 commit 97ff55c
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions tests/determine-reboot-cause_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -212,11 +212,8 @@ def create_mock_platform_json(self, dpus):
json.dump({"DPUS": dpus}, f)

@mock.patch('sonic_py_common.device_info.is_smartswitch', return_value=True)
@mock.patch('sonic_py_common.device_info')
def test_check_and_create_dpu_dirs(self, mock_device_info, mock_is_smartswitch):
# Set up the mock return value for is_smartswitch
mock_device_info.is_smartswitch.return_value = True

@mock.patch('sonic_py_common.device_info.get_platform', return_value='some_platform')
def test_check_and_create_dpu_dirs(self, mock_get_platform, mock_is_smartswitch):
# Call the function under test
result = check_and_create_dpu_dirs()
assert result is not None

0 comments on commit 97ff55c

Please sign in to comment.