diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/tests/test_config_parser.py | 7 | ||||
-rw-r--r-- | src/tests/test_initial_setup.py | 7 | ||||
-rw-r--r-- | src/tests/test_task_scheduler.py | 5 | ||||
-rw-r--r-- | src/tests/test_util.py | 2 |
4 files changed, 6 insertions, 15 deletions
diff --git a/src/tests/test_config_parser.py b/src/tests/test_config_parser.py index e47770a7f..5b922e2dd 100644 --- a/src/tests/test_config_parser.py +++ b/src/tests/test_config_parser.py @@ -1,6 +1,6 @@ #!/usr/bin/env python3 # -# Copyright (C) 2018 VyOS maintainers and contributors +# Copyright (C) 2018-2020 VyOS maintainers and contributors # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License version 2 or later as @@ -13,17 +13,14 @@ # # You should have received a copy of the GNU General Public License # along with this program. If not, see <http://www.gnu.org/licenses/>. -# -# import os import tempfile import unittest -from unittest import TestCase, mock +from unittest import TestCase import vyos.configtree - class TestConfigParser(TestCase): def setUp(self): with open('tests/data/config.valid', 'r') as f: diff --git a/src/tests/test_initial_setup.py b/src/tests/test_initial_setup.py index 1597025e8..cb843ff09 100644 --- a/src/tests/test_initial_setup.py +++ b/src/tests/test_initial_setup.py @@ -13,18 +13,15 @@ # # You should have received a copy of the GNU General Public License # along with this program. If not, see <http://www.gnu.org/licenses/>. -# -# import os import tempfile import unittest -from unittest import TestCase, mock - -from vyos import xml import vyos.configtree import vyos.initialsetup as vis +from unittest import TestCase +from vyos import xml class TestInitialSetup(TestCase): def setUp(self): diff --git a/src/tests/test_task_scheduler.py b/src/tests/test_task_scheduler.py index 084bd868c..f15fcde88 100644 --- a/src/tests/test_task_scheduler.py +++ b/src/tests/test_task_scheduler.py @@ -1,6 +1,6 @@ #!/usr/bin/env python3 # -# Copyright (C) 2018 VyOS maintainers and contributors +# Copyright (C) 2018-2020 VyOS maintainers and contributors # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License version 2 or later as @@ -13,14 +13,13 @@ # # You should have received a copy of the GNU General Public License # along with this program. If not, see <http://www.gnu.org/licenses/>. -# -# import os import tempfile import unittest from vyos import ConfigError + try: from src.conf_mode import task_scheduler except ModuleNotFoundError: # for unittest.main() diff --git a/src/tests/test_util.py b/src/tests/test_util.py index 0e56a67a8..09bf947b8 100644 --- a/src/tests/test_util.py +++ b/src/tests/test_util.py @@ -13,8 +13,6 @@ # # You should have received a copy of the GNU General Public License # along with this program. If not, see <http://www.gnu.org/licenses/>. -# -# import unittest from unittest import TestCase |