From 9939139ba4ad18dc4b62a827d8ab7b74d0c28124 Mon Sep 17 00:00:00 2001 From: Christian Poessinger Date: Sat, 24 Oct 2020 17:11:41 +0200 Subject: test: vyos.util: add testcase for process_named_running() --- src/tests/test_util.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/tests/test_util.py b/src/tests/test_util.py index 09bf947b8..44122146f 100644 --- a/src/tests/test_util.py +++ b/src/tests/test_util.py @@ -19,7 +19,6 @@ from unittest import TestCase import vyos.util - class TestVyOSUtil(TestCase): def setUp(self): pass @@ -30,3 +29,6 @@ class TestVyOSUtil(TestCase): new_data = vyos.util.mangle_dict_keys(data, '-', '_') self.assertEqual(new_data, expected_data) + def test_process_named_running(self): + pid = vyos.util.process_named_running('bash') + self.assertTrue(isinstance(pid, int)) -- cgit v1.2.3