summaryrefslogtreecommitdiffstats
path: root/dovetail/tests/unit
diff options
context:
space:
mode:
authorxudan <xudan16@huawei.com>2016-12-05 08:28:20 +0000
committerxudan <xudan16@huawei.com>2016-12-05 08:38:22 +0000
commitaa6e0b06aa404557bfe653746bc7c3f62a81f705 (patch)
treea4ee80fb278c8161151cc8497cdb58cb03e55ea8 /dovetail/tests/unit
parentec43484e1c8c8123a0e45c78d6fcb5a8d5560b43 (diff)
dovetail tool: add unit test into script unittest.sh
1. Since JIRA: DOVETAIL-55 has been merged, unit tests can't pass without load_config_files(). 2. Fix the bug by adding load_config_files(). 3. Add run_tests() into script unittest.sh to include all unit tests in tests/unit. JIRA: DOVETAIL-149 Change-Id: I7bdb0732fefde3a3f3b82441b4cc7e46ece66a1e Signed-off-by: xudan <xudan16@huawei.com>
Diffstat (limited to 'dovetail/tests/unit')
-rw-r--r--dovetail/tests/unit/test_parser.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/dovetail/tests/unit/test_parser.py b/dovetail/tests/unit/test_parser.py
index b4331ea1..2183bd60 100644
--- a/dovetail/tests/unit/test_parser.py
+++ b/dovetail/tests/unit/test_parser.py
@@ -14,7 +14,6 @@ Test 'parser' module
import logging
import os
import unittest
-
import yaml
import parser as dovetail_parser
@@ -26,8 +25,10 @@ class TestParser(unittest.TestCase):
def setUp(self):
"""Test case setup"""
- logging.disable(logging.CRITICAL)
+ from conf.dovetail_config import DovetailConfig as dt_config
+ dt_config.load_config_files()
dovetail_parser.Parser.create_log()
+ logging.disable(logging.CRITICAL)
def test_parser_cmd(self):
"""Test whether the command is correctly parsed."""