Commit 879cc3bf authored by Никита Ефремов's avatar Никита Ефремов Committed by Никита Ефремов

test.py file added

parent 545e1d09
import subprocess as sbp
from unittest import TestCase, main
import xml.etree.ElementTree as ET
from pprint import pprint as pp
list_ = ["common_info", "date_time", "dnsmasq_config", "example",
"local_groups", "local_users", "machine", "network", "nss_roles",
"ntp_config", "package_updates", "rtorrentd_config", "ssl",
"statistics", "system_services"]
cmd = "dbus-send --system --type=method_call --print-reply \
--dest=org.etersoft.settingsd /org/etersoft/settingsd/functions/{func_name}\
org.etersoft.settingsd.functions.{funcName}.{interface}.{method} {args}"
class TestSettingsdMain(TestCase):
def test_common_info(self):
res = sbp.run(cmd.format(func_name="common_info", funcName="commonInfo", interface="lsbRelease", method="version", args=""), stdout=sbp.PIPE)
res = res.stdout.decode('utf-8')
print(res)
if __name__ == '__main__':
main()
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment