Skip to content

Commit

Permalink
passed validate params test case
Browse files Browse the repository at this point in the history
  • Loading branch information
kanza-latif committed Jan 1, 2025
1 parent e639742 commit 3d6ed3e
Showing 1 changed file with 2 additions and 8 deletions.
10 changes: 2 additions & 8 deletions tests/test_config_stp.py
Original file line number Diff line number Diff line change
Expand Up @@ -158,17 +158,11 @@ def test_disable_global_mst():


def test_validate_params():
mock_ctx = MagicMock()

# Valid parameter
try:
validate_params(mock_ctx, "bridge_priority", 32768)
except SystemExit:
pytest.fail("Unexpected failure on valid parameter")
assert validate_params(15, 20, 5) is True # This should pass as the values meet the condition

# Invalid parameter
with pytest.raises(SystemExit):
validate_params(mock_ctx, "bridge_priority", 99999)
assert validate_params(15, 50, 5) is False # This should fail as the condition is not met


def test_get_bridge_mac_address():
Expand Down

0 comments on commit 3d6ed3e

Please sign in to comment.