JIRA: BOTTLENECKS-29
[bottlenecks.git] / vstf / 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     def setUp(self):
19         super(Test, self).setUp()
20         self.dir = os.path.dirname(__file__)
21
22     def tearDown(self):
23         super(Test, self).tearDown()
24
25     def test_parse_cfg_file(self):
26         for m in ['Ti', 'Tu', 'Tn', 'Tnv']:
27             filepath = os.path.join(self.dir, 'configuration/env/%s.json' % m)
28             parser = IntentParser(filepath)
29             parser.parse_cfg_file()
30
31
32 if __name__ == "__main__":
33     import logging
34
35     logging.basicConfig(level=logging.INFO)
36     unittest.main()