summaryrefslogtreecommitdiff
path: root/smoketest/scripts/cli/test_system_lcd.py
diff options
context:
space:
mode:
authorChristian Poessinger <christian@poessinger.com>2020-09-24 19:54:15 +0200
committerChristian Poessinger <christian@poessinger.com>2020-09-24 19:54:15 +0200
commit58ead7415a3fe8d786bdb6fd2a99d0a57770dbd7 (patch)
treeeacbad8eb616ca4fc1945b6048e433204fccfc69 /smoketest/scripts/cli/test_system_lcd.py
parent4db00f1cd820f4fc462ce3537d692694224e02a4 (diff)
downloadvyos-1x-58ead7415a3fe8d786bdb6fd2a99d0a57770dbd7.tar.gz
vyos-1x-58ead7415a3fe8d786bdb6fd2a99d0a57770dbd7.zip
smoketest: (re-)use process_named_running() from vyos.util
Diffstat (limited to 'smoketest/scripts/cli/test_system_lcd.py')
-rwxr-xr-xsmoketest/scripts/cli/test_system_lcd.py9
1 files changed, 5 insertions, 4 deletions
diff --git a/smoketest/scripts/cli/test_system_lcd.py b/smoketest/scripts/cli/test_system_lcd.py
index 931a91c53..9385799b0 100755
--- a/smoketest/scripts/cli/test_system_lcd.py
+++ b/smoketest/scripts/cli/test_system_lcd.py
@@ -18,9 +18,10 @@ import os
import unittest
from configparser import ConfigParser
-from psutil import process_iter
from vyos.configsession import ConfigSession
+from vyos.util import process_named_running
+config_file = '/run/LCDd/LCDd.conf'
base_path = ['system', 'lcd']
class TestSystemLCD(unittest.TestCase):
@@ -42,13 +43,13 @@ class TestSystemLCD(unittest.TestCase):
# load up ini-styled LCDd.conf
conf = ConfigParser()
- conf.read('/run/LCDd/LCDd.conf')
+ conf.read(config_file)
self.assertEqual(conf['CFontzPacket']['Model'], '533')
self.assertEqual(conf['CFontzPacket']['Device'], '/dev/ttyS1')
- # both processes running
- self.assertTrue('LCDd' in (p.name() for p in process_iter()))
+ # Check for running process
+ self.assertTrue(process_named_running('LCDd'))
if __name__ == '__main__':
unittest.main()