Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
S
settingsd
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
1
Merge Requests
1
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
etersoft
settingsd
Commits
879cc3bf
Commit
879cc3bf
authored
Apr 11, 2019
by
Никита Ефремов
Committed by
Никита Ефремов
Apr 24, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
test.py file added
parent
545e1d09
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
27 additions
and
0 deletions
+27
-0
test.py
test.py
+27
-0
No files found.
test.py
0 → 100644
View file @
879cc3bf
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
()
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment