mirror of
https://git.selfprivacy.org/SelfPrivacy/selfprivacy-rest-api.git
synced 2025-02-07 08:30:38 +00:00
test(root_daemon): break out startup
This commit is contained in:
parent
76d83c41cf
commit
743fb8a542
|
@ -48,7 +48,7 @@ def test_init():
|
|||
assert sock is not None
|
||||
|
||||
|
||||
def test_send_command():
|
||||
def start_root_demon():
|
||||
root_daemon_file = selfprivacy_api.root_daemon.__file__
|
||||
# this is a prototype of how we need to run it`
|
||||
proc = subprocess.Popen(args=["python", root_daemon_file], shell=False)
|
||||
|
@ -58,6 +58,12 @@ def test_send_command():
|
|||
finished = proc.poll()
|
||||
assert finished is None
|
||||
|
||||
return proc
|
||||
|
||||
|
||||
def test_send_command():
|
||||
proc = start_root_demon()
|
||||
|
||||
answer = call_root_function(["blabla"])
|
||||
assert answer == "not permitted"
|
||||
# confirm the loop
|
||||
|
|
Loading…
Reference in a new issue