Skip to content

Commit

Permalink
Updated test cases w.r.t to PR#2669
Browse files Browse the repository at this point in the history
  • Loading branch information
MuhammadUmarAsad committed Feb 11, 2023
1 parent 99609dd commit 4176fec
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions tests/vlan_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -449,23 +449,23 @@ def test_config_vlan_del_vlan_with_nonexist_vlanid(self):
assert result.exit_code != 0
assert "Error: Vlan1001 does not exist" in result.output

def test_config_vlan_add_vlan_with_multiple_vlanids(self):
def test_config_vlan_add_vlan_with_multiple_vlanids(self, mock_restart_dhcp_relay_service):
runner = CliRunner()
result = runner.invoke(config.config.commands["vlan"].commands["add"], ["10,20,30,40", "--multiple"])
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):
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):
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)
Expand Down Expand Up @@ -801,7 +801,7 @@ def test_config_add_del_vlan_and_vlan_member_in_alias_mode(self, mock_restart_dh

os.environ['SONIC_CLI_IFACE_MODE'] = "default"

def test_config_add_del_multiple_vlan_and_vlan_member(self):
def test_config_add_del_multiple_vlan_and_vlan_member(self,mock_restart_dhcp_relay_service):
runner = CliRunner()
db = Db()

Expand Down Expand Up @@ -864,7 +864,7 @@ def test_config_add_del_multiple_vlan_and_vlan_member(self):
assert result.exit_code == 0
assert result.output == show_vlan_brief_output

def test_config_add_del_add_vlans_and_add_vlans_member_except_vlan(self):
def test_config_add_del_add_vlans_and_add_vlans_member_except_vlan(self, mock_restart_dhcp_relay_service):
runner = CliRunner()
db = Db()

Expand Down Expand Up @@ -943,7 +943,7 @@ def test_config_add_del_add_vlans_and_add_vlans_member_except_vlan(self):
assert result.output == show_vlan_brief_output


def test_config_add_del_add_vlans_and_add_all_vlan_member(self):
def test_config_add_del_add_vlans_and_add_all_vlan_member(self, mock_restart_dhcp_relay_service):
runner = CliRunner()
db = Db()

Expand Down Expand Up @@ -1010,7 +1010,7 @@ def test_config_add_del_add_vlans_and_add_all_vlan_member(self):
assert result.exit_code == 0
assert result.output == show_vlan_brief_output

def test_config_add_del_vlan_and_vlan_member_with_switchport_modes(self):
def test_config_add_del_vlan_and_vlan_member_with_switchport_modes(self, mock_restart_dhcp_relay_service):
runner = CliRunner()
db = Db()

Expand Down Expand Up @@ -1126,7 +1126,7 @@ def test_config_add_del_vlan_and_vlan_member_with_switchport_modes(self):
assert result.output == show_vlan_brief_output


def test_config_add_del_vlan_and_vlan_member_with_switchport_modes_and_change_mode_types(self):
def test_config_add_del_vlan_and_vlan_member_with_switchport_modes_and_change_mode_types(self, mock_restart_dhcp_relay_service):
runner = CliRunner()
db = Db()

Expand Down

0 comments on commit 4176fec

Please sign in to comment.