diff options
-rw-r--r-- | scripts/cli/base_interfaces_test.py | 3 | ||||
-rwxr-xr-x | scripts/cli/test_interfaces_bonding.py | 2 | ||||
-rwxr-xr-x | scripts/cli/test_interfaces_bridge.py | 2 | ||||
-rwxr-xr-x | scripts/cli/test_interfaces_dummy.py | 2 | ||||
-rwxr-xr-x | scripts/cli/test_interfaces_ethernet.py | 2 | ||||
-rwxr-xr-x | scripts/cli/test_interfaces_loopback.py | 2 | ||||
-rwxr-xr-x | scripts/cli/test_interfaces_tunnel.py | 2 | ||||
-rwxr-xr-x | scripts/cli/test_service_dns_dynamic.py | 3 | ||||
-rwxr-xr-x | scripts/cli/test_service_snmp.py | 4 | ||||
-rwxr-xr-x | scripts/cli/test_service_ssh.py | 4 | ||||
-rwxr-xr-x | scripts/cli/test_system_login.py | 3 | ||||
-rwxr-xr-x | scripts/cli/test_system_nameserver.py | 3 |
12 files changed, 6 insertions, 26 deletions
diff --git a/scripts/cli/base_interfaces_test.py b/scripts/cli/base_interfaces_test.py index 6c558795a..180a11bfb 100644 --- a/scripts/cli/base_interfaces_test.py +++ b/scripts/cli/base_interfaces_test.py @@ -15,7 +15,6 @@ import os import unittest -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 @@ -25,8 +24,6 @@ class BasicInterfaceTest: class BaseTest(unittest.TestCase): def setUp(self): self.session = ConfigSession(os.getpid()) - env = self.session.get_session_env() - self.config = Config(session_env=env) self._test_addr = ['192.0.2.1/25', '2001:db8:1::ffff/64'] self._test_mtu = False diff --git a/scripts/cli/test_interfaces_bonding.py b/scripts/cli/test_interfaces_bonding.py index e1abd7ff1..ccb4428b4 100755 --- a/scripts/cli/test_interfaces_bonding.py +++ b/scripts/cli/test_interfaces_bonding.py @@ -14,7 +14,7 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see <http://www.gnu.org/licenses/>. -from base_interfaces_test import * +from base_interfaces_test import BasicInterfaceTest from vyos.interfaces import list_interfaces_of_type class BondingInterfaceTest(BasicInterfaceTest.BaseTest): diff --git a/scripts/cli/test_interfaces_bridge.py b/scripts/cli/test_interfaces_bridge.py index d35ac6eb6..545239038 100755 --- a/scripts/cli/test_interfaces_bridge.py +++ b/scripts/cli/test_interfaces_bridge.py @@ -14,7 +14,7 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see <http://www.gnu.org/licenses/>. -from base_interfaces_test import * +from base_interfaces_test import BasicInterfaceTest from vyos.interfaces import list_interfaces_of_type class BridgeInterfaceTest(BasicInterfaceTest.BaseTest): diff --git a/scripts/cli/test_interfaces_dummy.py b/scripts/cli/test_interfaces_dummy.py index 3f0cb8bcc..21d0a5cf8 100755 --- a/scripts/cli/test_interfaces_dummy.py +++ b/scripts/cli/test_interfaces_dummy.py @@ -14,7 +14,7 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see <http://www.gnu.org/licenses/>. -from base_interfaces_test import * +from base_interfaces_test import BasicInterfaceTest class DummyInterfaceTest(BasicInterfaceTest.BaseTest): def setUp(self): diff --git a/scripts/cli/test_interfaces_ethernet.py b/scripts/cli/test_interfaces_ethernet.py index f8eac6ec3..a2cede02e 100755 --- a/scripts/cli/test_interfaces_ethernet.py +++ b/scripts/cli/test_interfaces_ethernet.py @@ -14,7 +14,7 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see <http://www.gnu.org/licenses/>. -from base_interfaces_test import * +from base_interfaces_test import BasicInterfaceTest from vyos.interfaces import list_interfaces_of_type class EthernetInterfaceTest(BasicInterfaceTest.BaseTest): diff --git a/scripts/cli/test_interfaces_loopback.py b/scripts/cli/test_interfaces_loopback.py index ceb06aced..697c7cd99 100755 --- a/scripts/cli/test_interfaces_loopback.py +++ b/scripts/cli/test_interfaces_loopback.py @@ -14,7 +14,7 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see <http://www.gnu.org/licenses/>. -from base_interfaces_test import * +from base_interfaces_test import BasicInterfaceTest class LoopbackInterfaceTest(BasicInterfaceTest.BaseTest): def setUp(self): diff --git a/scripts/cli/test_interfaces_tunnel.py b/scripts/cli/test_interfaces_tunnel.py index 136a33c35..8f8311511 100755 --- a/scripts/cli/test_interfaces_tunnel.py +++ b/scripts/cli/test_interfaces_tunnel.py @@ -14,7 +14,7 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see <http://www.gnu.org/licenses/>. -from base_interfaces_test import * +from base_interfaces_test import BasicInterfaceTest from vyos.ifconfig import Interface diff --git a/scripts/cli/test_service_dns_dynamic.py b/scripts/cli/test_service_dns_dynamic.py index 21d52be18..e6205cf8b 100755 --- a/scripts/cli/test_service_dns_dynamic.py +++ b/scripts/cli/test_service_dns_dynamic.py @@ -20,7 +20,6 @@ import unittest from getpass import getuser from psutil import process_iter -from vyos.config import Config from vyos.configsession import ConfigSession, ConfigSessionError from vyos.util import read_file @@ -47,8 +46,6 @@ def check_process(): class TestServiceDDNS(unittest.TestCase): def setUp(self): self.session = ConfigSession(os.getpid()) - env = self.session.get_session_env() - self.config = Config(session_env=env) def tearDown(self): # Delete DDNS configuration diff --git a/scripts/cli/test_service_snmp.py b/scripts/cli/test_service_snmp.py index d2e5fff27..d4bbdc0b1 100755 --- a/scripts/cli/test_service_snmp.py +++ b/scripts/cli/test_service_snmp.py @@ -21,7 +21,6 @@ import unittest from vyos.validate import is_ipv4 from psutil import process_iter -from vyos.config import Config from vyos.configsession import ConfigSession, ConfigSessionError from vyos.util import read_file @@ -36,9 +35,6 @@ def get_config_value(key): class TestSNMPService(unittest.TestCase): def setUp(self): self.session = ConfigSession(os.getpid()) - env = self.session.get_session_env() - self.config = Config(session_env=env) - # ensure we can also run this test on a live system - so lets clean # out the current configuration :) self.session.delete(base_path) diff --git a/scripts/cli/test_service_ssh.py b/scripts/cli/test_service_ssh.py index 43656be9b..f9f0de3db 100755 --- a/scripts/cli/test_service_ssh.py +++ b/scripts/cli/test_service_ssh.py @@ -19,7 +19,6 @@ import os import unittest from psutil import process_iter -from vyos.config import Config from vyos.configsession import ConfigSession, ConfigSessionError from vyos.util import read_file @@ -35,9 +34,6 @@ def get_config_value(key): class TestServiceSSH(unittest.TestCase): def setUp(self): self.session = ConfigSession(os.getpid()) - env = self.session.get_session_env() - self.config = Config(session_env=env) - # ensure we can also run this test on a live system - so lets clean # out the current configuration :) self.session.delete(base_path) diff --git a/scripts/cli/test_system_login.py b/scripts/cli/test_system_login.py index 4abbcaf20..3c4b1fa28 100755 --- a/scripts/cli/test_system_login.py +++ b/scripts/cli/test_system_login.py @@ -19,7 +19,6 @@ import re import unittest from subprocess import Popen, PIPE -from vyos.config import Config from vyos.configsession import ConfigSession, ConfigSessionError import vyos.util as util @@ -29,8 +28,6 @@ users = ['vyos1', 'vyos2'] class TestSystemLogin(unittest.TestCase): def setUp(self): self.session = ConfigSession(os.getpid()) - env = self.session.get_session_env() - self.config = Config(session_env=env) def tearDown(self): # Delete individual users from configuration diff --git a/scripts/cli/test_system_nameserver.py b/scripts/cli/test_system_nameserver.py index 07fc9494b..9040be072 100755 --- a/scripts/cli/test_system_nameserver.py +++ b/scripts/cli/test_system_nameserver.py @@ -18,7 +18,6 @@ import os import re import unittest -from vyos.config import Config from vyos.configsession import ConfigSession, ConfigSessionError import vyos.util as util @@ -34,8 +33,6 @@ def get_name_servers(): class TestSystemNameServer(unittest.TestCase): def setUp(self): self.session = ConfigSession(os.getpid()) - env = self.session.get_session_env() - self.config = Config(session_env=env) def tearDown(self): # Delete existing name servers |