mirror of
https://github.com/freedombox/FreedomBox.git
synced 2026-05-20 10:34:30 +00:00
Update test cases for new directory structure
This commit is contained in:
parent
c95db2fe7e
commit
e0816cd432
@ -1,17 +1,19 @@
|
|||||||
#! /usr/bin/env python
|
#!/usr/bin/python
|
||||||
# -*- mode: python; mode: auto-fill; fill-column: 80 -*-
|
# -*- mode: python; mode: auto-fill; fill-column: 80 -*-
|
||||||
|
|
||||||
from actions import superuser_run, run
|
|
||||||
import os
|
import os
|
||||||
import shlex
|
import shlex
|
||||||
import subprocess
|
import subprocess
|
||||||
import unittest
|
import unittest
|
||||||
|
|
||||||
import cfg
|
from plinth.actions import superuser_run, run
|
||||||
|
from plinth import cfg
|
||||||
|
|
||||||
|
|
||||||
ROOT_DIR = os.path.split(os.path.abspath(os.path.split(__file__)[0]))[0]
|
ROOT_DIR = os.path.split(os.path.abspath(os.path.split(__file__)[0]))[0]
|
||||||
cfg.actions_dir = os.path.join(ROOT_DIR, 'actions')
|
cfg.actions_dir = os.path.join(ROOT_DIR, 'actions')
|
||||||
|
|
||||||
|
|
||||||
class TestPrivileged(unittest.TestCase):
|
class TestPrivileged(unittest.TestCase):
|
||||||
"""Verify that privileged actions perform as expected.
|
"""Verify that privileged actions perform as expected.
|
||||||
|
|
||||||
@ -110,5 +112,6 @@ class TestPrivileged(unittest.TestCase):
|
|||||||
subprocess.check_output(shlex.split("id -ur")).strip(),
|
subprocess.check_output(shlex.split("id -ur")).strip(),
|
||||||
run("id", ["-u" ,"-r"])[0].strip())
|
run("id", ["-u" ,"-r"])[0].strip())
|
||||||
|
|
||||||
|
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
unittest.main()
|
unittest.main()
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user