Merge "Change PTL informatin in INFO"
[bottlenecks.git] / testsuites / vstf / vstf_scripts / vstf / controller / unittest / test_cfg_intent_parse.py
1 ##############################################################################
2 # Copyright (c) 2015 Huawei Technologies Co.,Ltd and others.
3 #
4 # All rights reserved. This program and the accompanying materials
5 # are made available under the terms of the Apache License, Version 2.0
6 # which accompanies this distribution, and is available at
7 # http://www.apache.org/licenses/LICENSE-2.0
8 ##############################################################################
9
10 import os
11 import unittest
12
13 from vstf.controller.unittest import model
14 from vstf.controller.env_build.cfg_intent_parse import IntentParser
15
16
17 class Test(model.Test):
18
19     def setUp(self):
20         super(Test, self).setUp()
21         self.dir = os.path.dirname(__file__)
22
23     def tearDown(self):
24         super(Test, self).tearDown()
25
26     def test_parse_cfg_file(self):
27         for m in ['Ti', 'Tu', 'Tn', 'Tnv']:
28             filepath = os.path.join(self.dir, 'configuration/env/%s.json' % m)
29             parser = IntentParser(filepath)
30             parser.parse_cfg_file()
31
32
33 if __name__ == "__main__":
34     import logging
35
36     logging.basicConfig(level=logging.INFO)
37     unittest.main()