summaryrefslogtreecommitdiff
path: root/src/tests
diff options
context:
space:
mode:
authorChristian Breunig <christian@breunig.cc>2023-07-12 21:25:10 +0200
committerChristian Breunig <christian@breunig.cc>2023-07-12 21:26:25 +0200
commitac60fe7d1840b8768542ee4b3f28f46544c290f2 (patch)
tree37a62d5dbdefe67b0050846a388e9949f1a14da2 /src/tests
parent4e2a087cc7e91a510dd590f7cc761e36ac8f77f8 (diff)
downloadvyos-1x-ac60fe7d1840b8768542ee4b3f28f46544c290f2.tar.gz
vyos-1x-ac60fe7d1840b8768542ee4b3f28f46544c290f2.zip
T5195: drop sysctl_* implementation from vyos.util - prefer vyos.utils.system
Diffstat (limited to 'src/tests')
-rw-r--r--src/tests/test_util.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/tests/test_util.py b/src/tests/test_util.py
index 473052bef..2e8f1b6cc 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):
+ from vyos.util 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')