diff options
author | Yuya Kusakabe <yuya.kusakabe@gmail.com> | 2018-05-16 21:35:22 +0900 |
---|---|---|
committer | Yuya Kusakabe <yuya.kusakabe@gmail.com> | 2018-05-16 21:35:22 +0900 |
commit | be6f809581ccbcd6411713128a63711eaa2ce6b7 (patch) | |
tree | c62377a36c274d878224dc102562fdfbc10e17be /src/tests | |
parent | 99a3049c67005bf5e0ba45db264d56d3b57cb792 (diff) | |
download | vyos-1x-be6f809581ccbcd6411713128a63711eaa2ce6b7.tar.gz vyos-1x-be6f809581ccbcd6411713128a63711eaa2ce6b7.zip |
Use '_' instead of '-' for python scripts for test
Diffstat (limited to 'src/tests')
-rw-r--r-- | src/tests/test_vyos_update_crontab.py | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/src/tests/test_vyos_update_crontab.py b/src/tests/test_vyos_update_crontab.py index efeadf2f5..180871300 100644 --- a/src/tests/test_vyos_update_crontab.py +++ b/src/tests/test_vyos_update_crontab.py @@ -17,17 +17,16 @@ # import os -import sys import tempfile import unittest from vyos import ConfigError -import helper - -file_path = 'src/conf-mode/vyos-update-crontab.py' -module_name = 'vyos_update_crontab' -helper.prepare_module(file_path, module_name) -import vyos_update_crontab +try: + from src.conf_mode import vyos_update_crontab +except ModuleNotFoundError: # for unittest.main() + import sys + sys.path.append(os.path.join(os.path.dirname(__file__), '../..')) + from src.conf_mode import vyos_update_crontab class TestUpdateCrontab(unittest.TestCase): |