Modify TestCase constructor attributes
[functest.git] / functest / tests / unit / features / test_copper.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 copper
16 from functest.utils import constants
17
18
19 class CopperTesting(unittest.TestCase):
20
21     logging.disable(logging.CRITICAL)
22
23     _case_name = "copper-notification"
24     _project_name = "copper"
25
26     def setUp(self):
27         self.copper = copper.Copper(case_name=self._case_name,
28                                     project_name=self._project_name)
29
30     def test_init(self):
31         self.assertEqual(self.copper.project_name, self._project_name)
32         self.assertEqual(self.copper.case_name, self._case_name)
33         self.assertEqual(
34             self.copper.repo,
35             constants.CONST.__getattribute__("dir_repo_copper"))
36         self.assertEqual(
37             self.copper.cmd,
38             "cd {}/tests && bash run.sh && cd -".format(self.copper.repo))
39
40
41 if __name__ == "__main__":
42     unittest.main(verbosity=2)