summaryrefslogtreecommitdiff
path: root/src/tests/test_vyos_update_crontab.py
diff options
context:
space:
mode:
Diffstat (limited to 'src/tests/test_vyos_update_crontab.py')
-rw-r--r--src/tests/test_vyos_update_crontab.py13
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):