diff --git a/tests/test_network_connections.py b/tests/test_network_connections.py index 67cb1c9..5207999 100755 --- a/tests/test_network_connections.py +++ b/tests/test_network_connections.py @@ -11,7 +11,7 @@ TESTS_BASEDIR = os.path.dirname(os.path.abspath(__file__)) sys.path.insert(1, os.path.join(TESTS_BASEDIR, "..", "library")) import network_connections as n -from network_connections import SysUtil +from network_connections import SysUtil, Util try: @@ -1880,6 +1880,13 @@ class TestNM(unittest.TestCase): self.assertIsNotNone(connections) +class TestUtils(unittest.TestCase): + def test_check_output(self): + res = Util.check_output(["echo", "test"]) + self.assertEqual(res, "test\n") + self.assertRaises(n.MyError, Util.check_output, ["false"]) + + class TestSysUtils(unittest.TestCase): def test_link_read_permaddress(self): # Manipulate PATH to use ethtool mock script to avoid hard dependency on