diff options
author | Cédric Ollivier <cedric.ollivier@orange.com> | 2017-04-08 13:38:45 +0200 |
---|---|---|
committer | Cédric Ollivier <cedric.ollivier@orange.com> | 2017-04-11 14:23:21 +0200 |
commit | 96bacd7d8ffb9c05672c0a1fc6e68d19e4a6793a (patch) | |
tree | 7e0fa1d220628aa0ea3f6b0d36702224e2891628 /functest/tests/unit/features/test_promise.py | |
parent | ccc675b3095271d59dba3a49c0b116d0ff6c6bfb (diff) |
Modify TestCase constructor attributes
Every feature/testcase now allows receiving the data defined in
testcases.yaml as args (name is renamed to case_name).
From the time being, only project and case names are handled. Next
pending patches will add criteria, cmd and repo to this list.
It keeps the default values for case names except for features which
will be aggregated into Feature.
Change-Id: Id742d100b8183d7f10894c24ae6879d1b2b60ac9
Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
Diffstat (limited to 'functest/tests/unit/features/test_promise.py')
-rw-r--r-- | functest/tests/unit/features/test_promise.py | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/functest/tests/unit/features/test_promise.py b/functest/tests/unit/features/test_promise.py index 29b4d4ec8..2af9c6708 100644 --- a/functest/tests/unit/features/test_promise.py +++ b/functest/tests/unit/features/test_promise.py @@ -20,12 +20,16 @@ class PromiseTesting(unittest.TestCase): logging.disable(logging.CRITICAL) + _case_name = "promise" + _project_name = "promise" + def setUp(self): - self.promise = promise.Promise(case_name="promise") + self.promise = promise.Promise(case_name=self._case_name, + project_name=self._project_name) def test_init(self): - self.assertEqual(self.promise.project_name, "promise") - self.assertEqual(self.promise.case_name, "promise") + self.assertEqual(self.promise.project_name, self._project_name) + self.assertEqual(self.promise.case_name, self._case_name) self.assertEqual( self.promise.repo, constants.CONST.__getattribute__("dir_repo_promise")) |