summaryrefslogtreecommitdiff
path: root/scripts/cli
diff options
context:
space:
mode:
authorChristian Poessinger <christian@poessinger.com>2020-02-26 07:27:52 +0100
committerChristian Poessinger <christian@poessinger.com>2020-02-26 07:32:26 +0100
commitf1beefe681240113c6ec856b01e55dc646f52294 (patch)
treea58d4d6051476984a8ac77269363b791717605d2 /scripts/cli
parent74888b22f92abf7f10c8b0baddf815fb5d462897 (diff)
downloadvyos-1x-f1beefe681240113c6ec856b01e55dc646f52294.tar.gz
vyos-1x-f1beefe681240113c6ec856b01e55dc646f52294.zip
cli: remove superfluous imports (we never use Config())
Every test hat a Config() instance but it was never referenced. It has been introduced by simple means of copy/pasting the first nameserver test.
Diffstat (limited to 'scripts/cli')
-rw-r--r--scripts/cli/base_interfaces_test.py3
-rwxr-xr-xscripts/cli/test_service_dns_dynamic.py3
-rwxr-xr-xscripts/cli/test_service_snmp.py4
-rwxr-xr-xscripts/cli/test_service_ssh.py4
-rwxr-xr-xscripts/cli/test_system_login.py3
-rwxr-xr-xscripts/cli/test_system_nameserver.py3
6 files changed, 0 insertions, 20 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_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