diff options
author | Christian Poessinger <christian@poessinger.com> | 2020-02-09 13:02:18 +0100 |
---|---|---|
committer | Christian Poessinger <christian@poessinger.com> | 2020-02-09 13:02:18 +0100 |
commit | 6c2a6e0153ea36e5690661f0dec634322352f21a (patch) | |
tree | 9c49abb8b5e22686ae1e5d528082ccb6b6e2429a /scripts/cli/test_interfaces.py | |
parent | 189b724dd7e5f4a5be4137809376127298bf9d25 (diff) | |
download | vyos-1x-6c2a6e0153ea36e5690661f0dec634322352f21a.tar.gz vyos-1x-6c2a6e0153ea36e5690661f0dec634322352f21a.zip |
all: do not import entire module, use "from foo import" instead
Diffstat (limited to 'scripts/cli/test_interfaces.py')
-rwxr-xr-x | scripts/cli/test_interfaces.py | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/scripts/cli/test_interfaces.py b/scripts/cli/test_interfaces.py index 6bbacc585..ad8e653ce 100755 --- a/scripts/cli/test_interfaces.py +++ b/scripts/cli/test_interfaces.py @@ -16,9 +16,9 @@ import os import unittest -import vyos.config -import vyos.configsession +from vyos.config import Config +from vyos.configsession import ConfigSession, ConfigSessionError from netifaces import ifaddresses, AF_INET, AF_INET6 from vyos.validate import is_intf_addr_assigned, is_ipv6_link_local from vyos.interfaces import list_interfaces_of_type @@ -26,9 +26,9 @@ from vyos.interfaces import list_interfaces_of_type class BasicInterfaceTest: class BaseTest(unittest.TestCase): def setUp(self): - self.session = vyos.configsession.ConfigSession(os.getpid()) + self.session = ConfigSession(os.getpid()) env = self.session.get_session_env() - self.config = vyos.config.Config(session_env=env) + self.config = Config(session_env=env) self._test_addr = ['192.0.2.1/25', '2001:db8:1::ffff/64'] def tearDown(self): @@ -136,6 +136,7 @@ class BridgeInterfaceTest(BasicInterfaceTest.BaseTest): for intf in self._interfaces: self.session.delete(self._base_path + [intf, 'member']) + self.session.commit() |