Merge "update check_os.sh admin port seds to match public"
[functest.git] / functest / tests / unit / features / test_odl_sfc.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 odl_sfc
16 from functest.utils.constants import CONST
17
18
19 class OpenDaylightSFCTesting(unittest.TestCase):
20
21     logging.disable(logging.CRITICAL)
22
23     _case_name = "functest-odl-sfc"
24     _project_name = "sfc"
25
26     def setUp(self):
27         self.odl_sfc = odl_sfc.OpenDaylightSFC(
28             case_name="functest-odl-sfc",
29             project_name=self._project_name)
30
31     def test_init(self):
32         self.assertEqual(self.odl_sfc.project_name, "sfc")
33         self.assertEqual(self.odl_sfc.case_name, "functest-odl-sfc")
34         repo = CONST.__getattribute__('dir_repo_sfc')
35         dir_sfc_functest = '{}/sfc/tests/functest'.format(repo)
36         self.assertEqual(
37             self.odl_sfc.cmd,
38             'cd {} && python ./run_tests.py'.format(dir_sfc_functest))
39
40
41 if __name__ == "__main__":
42     unittest.main(verbosity=2)