@@ -0,0 +1,1333 @@
+import pytest%0A%0Afrom hil import config%0Afrom hil.ext.switches.common import parse_vlans, should_save%0Afrom hil.test_common import config_testsuite, config_merge%0Afrom hil.ext.switches.brocade import Brocade%0Afrom hil.ext.switches.dell import PowerConnect55xx%0A%0A%0A@pytest.fixture%0Adef configure():%0A    %22%22%22Configure HIL%22%22%22%0A    config_testsuite()%0A    config_merge(%7B%0A        'auth': %7B%0A            'require_authentication': 'True',%0A        %7D,%0A        'extensions': %7B%0A            'hil.ext.switches.brocade': '',%0A            'hil.ext.switches.dell': '',%0A        %7D,%0A        'hil.ext.switches.brocade': %7B%0A            'save': 'True'%0A        %7D,%0A        'hil.ext.switches.dell': %7B%0A            'save': 'False'%0A        %7D%0A    %7D)%0A    config.load_extensions()%0A%0A%0Adef test_parse_vlans():%0A    %22%22%22Test parse_vlans%22%22%22%0A    sample_inputs = %5B'12,14-18,23,28,80-90', '20', '20,22', '20-22'%5D%0A    assert parse_vlans('12,14') == %5B'12', '14'%5D%0A    assert parse_vlans('20-22') == %5B'20', '21', '22'%5D%0A    assert parse_vlans('1512') == %5B'1512'%5D%0A    assert parse_vlans('12,21-24,250,511-514') == %5B%0A            '12', '21', '22', '23', '24', '250', '511', '512', '513', '514'%5D%0A%0A%0Adef test_should_save(configure):%0A    %22%22%22Test should save method%22%22%22%0A    brocade = Brocade()%0A    dell = PowerConnect55xx()%0A%0A    assert should_save(brocade) is True%0A    assert should_save(dell) is False%0A

Add unit tests for switch.common