mirror of
https://github.com/freedombox/FreedomBox.git
synced 2026-05-13 10:30:16 +00:00
tests: Minor PEP8 fixes
This commit is contained in:
parent
9ac37465dd
commit
7a5167e6bd
@ -33,8 +33,8 @@ def run_tests(pattern=None, return_to_caller=False):
|
|||||||
os.environ['DJANGO_SETTINGS_MODULE'] = \
|
os.environ['DJANGO_SETTINGS_MODULE'] = \
|
||||||
'plinth.tests.data.django_test_settings'
|
'plinth.tests.data.django_test_settings'
|
||||||
django.setup()
|
django.setup()
|
||||||
TestRunner = get_runner(settings)
|
test_runner_cls = get_runner(settings)
|
||||||
test_runner = TestRunner()
|
test_runner = test_runner_cls()
|
||||||
|
|
||||||
if pattern is None:
|
if pattern is None:
|
||||||
pattern_list = [
|
pattern_list = [
|
||||||
@ -48,5 +48,6 @@ def run_tests(pattern=None, return_to_caller=False):
|
|||||||
if failures > 0 or not return_to_caller:
|
if failures > 0 or not return_to_caller:
|
||||||
sys.exit(bool(failures))
|
sys.exit(bool(failures))
|
||||||
|
|
||||||
|
|
||||||
if __name__ == '__main__':
|
if __name__ == '__main__':
|
||||||
run_tests()
|
run_tests()
|
||||||
|
|||||||
@ -28,8 +28,8 @@ from plinth import cfg
|
|||||||
|
|
||||||
|
|
||||||
test_dir = os.path.split(__file__)[0]
|
test_dir = os.path.split(__file__)[0]
|
||||||
root_dir = os.path.abspath(os.path.join(test_dir, os.path.pardir + os.path.sep +
|
root_dir = os.path.abspath(os.path.join(test_dir, os.path.pardir +
|
||||||
os.path.pardir))
|
os.path.sep + os.path.pardir))
|
||||||
cfg.actions_dir = os.path.join(root_dir, 'actions')
|
cfg.actions_dir = os.path.join(root_dir, 'actions')
|
||||||
|
|
||||||
|
|
||||||
@ -114,7 +114,8 @@ class TestPrivileged(unittest.TestCase):
|
|||||||
def test_breakout_option_list(self):
|
def test_breakout_option_list(self):
|
||||||
"""3D. Option lists can't be used to run other actions.
|
"""3D. Option lists can't be used to run other actions.
|
||||||
|
|
||||||
Verify that shell control characters aren't interpreted in option lists.
|
Verify that shell control characters aren't interpreted in
|
||||||
|
option lists.
|
||||||
"""
|
"""
|
||||||
option_lists = ((';', 'echo', 'hello'),
|
option_lists = ((';', 'echo', 'hello'),
|
||||||
('&&', 'echo', 'hello'),
|
('&&', 'echo', 'hello'),
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user