Skip to content

Commit

Permalink
updated vlan test cases. Removed Assertion of vlan addition|deletion …
Browse files Browse the repository at this point in the history
…print statements wrt to changes in code
  • Loading branch information
MuhammadUmarAsad committed Mar 22, 2023
1 parent 55dbfb3 commit f4b130c
Showing 1 changed file with 0 additions and 50 deletions.
50 changes: 0 additions & 50 deletions tests/vlan_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -292,51 +292,6 @@
+-----------+-----------------+-----------------+----------------+-------------+
"""

test_config_vlan_add_vlan_with_multiple_vlanids_output = """\
Vlan10 has been added
Vlan20 has been added
Vlan30 has been added
Vlan40 has been added
"""


test_config_vlan_add_vlan_with_multiple_vlanids_with_range_output = """\
Vlan10 has been added
Vlan11 has been added
Vlan12 has been added
Vlan13 has been added
Vlan14 has been added
Vlan15 has been added
Vlan16 has been added
Vlan17 has been added
Vlan18 has been added
Vlan19 has been added
Vlan20 has been added
"""

test_config_vlan_add_vlan_with_multiple_vlanids_with_range_and_multiple_ids_output = """\
Vlan10 has been added
Vlan11 has been added
Vlan12 has been added
Vlan13 has been added
Vlan14 has been added
Vlan15 has been added
Vlan20 has been added
Vlan25 has been added
Vlan30 has been added
"""

test_config_add_del_multiple_vlan_and_vlan_member_vlan_add_output = """\
Vlan1001 has been added
Vlan1002 has been added
Vlan1003 has been added
"""

test_config_add_del_add_vlans_and_add_vlans_member_except_vlan_multiple_vlan_output = """\
Vlan1001 has been added
Vlan1002 has been added
"""



class TestVlan(object):
Expand Down Expand Up @@ -452,23 +407,20 @@ def test_config_vlan_add_vlan_with_multiple_vlanids(self, mock_restart_dhcp_rela
print(result.exit_code)
print(result.output)
assert result.exit_code == 0
assert result.output == test_config_vlan_add_vlan_with_multiple_vlanids_output

def test_config_vlan_add_vlan_with_multiple_vlanids_with_range(self, mock_restart_dhcp_relay_service):
runner = CliRunner()
result = runner.invoke(config.config.commands["vlan"].commands["add"], ["10-20", "--multiple"])
print(result.exit_code)
print(result.output)
assert result.exit_code == 0
assert result.output == test_config_vlan_add_vlan_with_multiple_vlanids_with_range_output

def test_config_vlan_add_vlan_with_multiple_vlanids_with_range_and_multiple_ids(self, mock_restart_dhcp_relay_service):
runner = CliRunner()
result = runner.invoke(config.config.commands["vlan"].commands["add"], ["10-15,20,25,30", "--multiple"])
print(result.exit_code)
print(result.output)
assert result.exit_code == 0
assert result.output == test_config_vlan_add_vlan_with_multiple_vlanids_with_range_and_multiple_ids_output

def test_config_vlan_add_vlan_with_wrong_range(self):
runner = CliRunner()
Expand Down Expand Up @@ -807,7 +759,6 @@ def test_config_add_del_multiple_vlan_and_vlan_member(self,mock_restart_dhcp_rel
print(result.exit_code)
print(result.output)
assert result.exit_code == 0
assert result.output == test_config_add_del_multiple_vlan_and_vlan_member_vlan_add_output

# add Ethernet20 to vlan1001, vlan1002, vlan1003 multiple flag but Ethernet20 is in routed mode will give error
result = runner.invoke(config.config.commands["vlan"].commands["member"].commands["add"],
Expand Down Expand Up @@ -870,7 +821,6 @@ def test_config_add_del_add_vlans_and_add_vlans_member_except_vlan(self, mock_re
print(result.exit_code)
print(result.output)
assert result.exit_code == 0
assert result.output == test_config_add_del_add_vlans_and_add_vlans_member_except_vlan_multiple_vlan_output

# add Ethernet20 to vlan1001, vlan1002, vlan1003 multiple flag but Ethernet20 is in routed mode will give error
result = runner.invoke(config.config.commands["vlan"].commands["member"].commands["add"],
Expand Down

0 comments on commit f4b130c

Please sign in to comment.