Skip to content

Commit

Permalink
add test 'test_acl_remove_table'
Browse files Browse the repository at this point in the history
  • Loading branch information
shiraez committed Feb 12, 2024
1 parent a4cf161 commit a00d425
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions tests/acl_config_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

from click.testing import CliRunner
from config.main import expand_vlan_ports, parse_acl_table_info
from unittest.mock import patch


class TestConfigAcl(object):
Expand Down Expand Up @@ -79,3 +80,16 @@ def test_acl_add_table_empty_vlan(self):

assert result.exit_code != 0
assert "Cannot bind empty VLAN Vlan3000" in result.output

@patch('utilities_common.cli.run_command')
def test_acl_remove_table(self, mock_run_command):
runner = CliRunner()
result = runner.invoke(
config.config.commands["acl"].commands["add"].commands["table"],
["TEST", "L3"])
assert result.exit_code == 0

result = runner.invoke(
config.config.commands["acl"].commands["remove"].commands["table"],
["TEST"])
assert result.exit_code == 0

0 comments on commit a00d425

Please sign in to comment.