summaryrefslogtreecommitdiff
path: root/src/tests
diff options
context:
space:
mode:
Diffstat (limited to 'src/tests')
-rw-r--r--src/tests/test_configverify.py2
-rw-r--r--src/tests/test_dict_search.py4
-rwxr-xr-xsrc/tests/test_find_device_file.py2
-rw-r--r--src/tests/test_util.py5
4 files changed, 7 insertions, 6 deletions
diff --git a/src/tests/test_configverify.py b/src/tests/test_configverify.py
index 6fb43ece2..15ccdf13d 100644
--- a/src/tests/test_configverify.py
+++ b/src/tests/test_configverify.py
@@ -16,7 +16,7 @@
from unittest import TestCase
from vyos.configverify import verify_diffie_hellman_length
-from vyos.util import cmd
+from vyos.utils.process import cmd
dh_file = '/tmp/dh.pem'
diff --git a/src/tests/test_dict_search.py b/src/tests/test_dict_search.py
index 1028437b2..2435d89c7 100644
--- a/src/tests/test_dict_search.py
+++ b/src/tests/test_dict_search.py
@@ -15,8 +15,8 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>.
from unittest import TestCase
-from vyos.util import dict_search
-from vyos.util import dict_search_recursive
+from vyos.utils.dict import dict_search
+from vyos.utils.dict import dict_search_recursive
data = {
'string': 'fooo',
diff --git a/src/tests/test_find_device_file.py b/src/tests/test_find_device_file.py
index 43c80dc76..f18043d65 100755
--- a/src/tests/test_find_device_file.py
+++ b/src/tests/test_find_device_file.py
@@ -15,7 +15,7 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>.
from unittest import TestCase
-from vyos.util import find_device_file
+from vyos.utils.system import find_device_file
class TestDeviceFile(TestCase):
""" used to find USB devices on target """
diff --git a/src/tests/test_util.py b/src/tests/test_util.py
index 473052bef..27ee648d4 100644
--- a/src/tests/test_util.py
+++ b/src/tests/test_util.py
@@ -15,14 +15,15 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>.
from unittest import TestCase
-from vyos.util import *
class TestVyOSUtil(TestCase):
- def test_key_mangline(self):
+ def test_key_mangling(self):
+ from vyos.utils.dict import mangle_dict_keys
data = {"foo-bar": {"baz-quux": None}}
expected_data = {"foo_bar": {"baz_quux": None}}
new_data = mangle_dict_keys(data, '-', '_')
self.assertEqual(new_data, expected_data)
def test_sysctl_read(self):
+ from vyos.utils.system import sysctl_read
self.assertEqual(sysctl_read('net.ipv4.conf.lo.forwarding'), '1')