Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def __init__(self, *args, **kwargs):
super(TestApiEthernetInterface, self).__init__(*args, **kwargs)
self.instance = pyeapi.api.interfaces.EthernetInterface(None)
self.config = open(get_fixture('running_config.text')).read()
def __init__(self, *args, **kwargs):
super(TestApiBaseInterface, self).__init__(*args, **kwargs)
self.instance = pyeapi.api.interfaces.BaseInterface(None)
self.config = open(get_fixture('running_config.text')).read()
def __init__(self, *args, **kwargs):
super(TestApiInterfaces, self).__init__(*args, **kwargs)
self.instance = pyeapi.api.interfaces.Interfaces(None)
self.config = open(get_fixture('running_config.text')).read()
def __init__(self, *args, **kwargs):
super(TestApiVxlanInterface, self).__init__(*args, **kwargs)
self.instance = pyeapi.api.interfaces.VxlanInterface(None)
self.config = open(get_fixture('running_config.vxlan')).read()
def test_isvalidinterface_returns_true(self):
func = pyeapi.api.interfaces.isvalidinterface
for intf in INTERFACES:
self.assertTrue(func(intf))
def test_instance(self):
result = pyeapi.api.interfaces.instance(None)
self.assertIsInstance(result, pyeapi.api.interfaces.Interfaces)
def __init__(self, *args, **kwargs):
super(TestApiPortchannelInterface, self).__init__(*args, **kwargs)
self.instance = pyeapi.api.interfaces.PortchannelInterface(None)
self.config = open(get_fixture('running_config.portchannel')).read()