Add case_name as args in all features
[functest.git] / functest / tests / unit / features / test_sdnvpn.py
1 #!/usr/bin/env python
2
3 # Copyright (c) 2017 Orange and others.
4 #
5 # All rights reserved. This program and the accompanying materials
6 # are made available under the terms of the Apache License, Version 2.0
7 # which accompanies this distribution, and is available at
8 # http://www.apache.org/licenses/LICENSE-2.0
9
10 # pylint: disable=missing-docstring
11
12 import logging
13 import unittest
14
15 from functest.opnfv_tests.features import sdnvpn
16 from functest.utils import constants
17
18
19 class SdnVpnTesting(unittest.TestCase):
20
21     logging.disable(logging.CRITICAL)
22
23     def setUp(self):
24         self.sdnvpn = sdnvpn.SdnVpnTests(case_name="bgpvpn")
25
26     def test_init(self):
27         self.assertEqual(self.sdnvpn.project_name, "sdnvpn")
28         self.assertEqual(self.sdnvpn.case_name, "bgpvpn")
29         self.assertEqual(
30             self.sdnvpn.repo,
31             constants.CONST.__getattribute__("dir_repo_sdnvpn"))
32         self.assertEqual(
33             self.sdnvpn.cmd,
34             'cd {}/sdnvpn/test/functest && python ./run_tests.py'.format(
35                 self.sdnvpn.repo))
36
37
38 if __name__ == "__main__":
39     unittest.main(verbosity=2)