Skip to content

Commit

Permalink
Update test_ccmis.py
Browse files Browse the repository at this point in the history
Fixing the test code failure case.
  • Loading branch information
jaganbal-a authored Aug 25, 2023
1 parent 5644385 commit 04e6048
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions tests/sonic_xcvr/test_ccmis.py
Original file line number Diff line number Diff line change
Expand Up @@ -631,19 +631,23 @@ def test_get_transceiver_pm(self, mock_response, expected):
(1, 1),
])
def test_freeze_vdm_stats(self, mock_response, expected):
original_api = self.api.util_status_check_with_retry
self.api.util_status_check_with_retry = MagicMock()
self.api.util_status_check_with_retry.return_value = mock_response
result = self.api.freeze_vdm_stats()
self.api.util_status_check_with_retry = original_api
assert result == expected

@pytest.mark.parametrize("mock_response, expected", [
(0, 0),
(1, 1),
])
def test_unfreeze_vdm_stats(self, mock_response, expected):
original_api = self.api.util_status_check_with_retry
self.api.util_status_check_with_retry = MagicMock()
self.api.util_status_check_with_retry.return_value = mock_response
result = self.api.unfreeze_vdm_stats()
self.api.util_status_check_with_retry = original_api
assert result == expected

@pytest.mark.parametrize("input_param, mock_response, expected",[
Expand Down

0 comments on commit 04e6048

Please sign in to comment.