Skip to content

Commit

Permalink
added test cases for get global stp mode and is valid stp global para…
Browse files Browse the repository at this point in the history
…meters
  • Loading branch information
kanza-latif committed Jan 2, 2025
1 parent 9bd5223 commit 954c905
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions tests/test_config_stp.py
Original file line number Diff line number Diff line change
Expand Up @@ -254,6 +254,7 @@ def test_check_if_global_stp_enabled():
check_if_global_stp_enabled(mock_db, mock_ctx)
mock_ctx.fail.assert_called_once_with("Global STP is not enabled - first configure STP mode")


def test_is_valid_stp_global_parameters():
# Create mock objects for db and ctx
mock_db = MagicMock()
Expand Down Expand Up @@ -314,6 +315,7 @@ def test_is_valid_stp_global_parameters():
mock_validate_params.assert_called_once_with("15", "20", "5")
mock_ctx.fail.assert_called_once_with("2*(forward_delay-1) >= max_age >= 2*(hello_time +1 ) not met")


def test_get_global_stp_mode():
# Create a mock database
mock_db = MagicMock()
Expand Down

0 comments on commit 954c905

Please sign in to comment.