diff options
author | Cédric Ollivier <cedric.ollivier@orange.com> | 2017-05-23 18:45:27 +0200 |
---|---|---|
committer | Cédric Ollivier <cedric.ollivier@orange.com> | 2017-05-23 21:00:24 +0200 |
commit | 8bec0314e40e23a0f2f3f6b3b183acd54fa51b99 (patch) | |
tree | a2b2dd8108b5b450657e056bede15d1e4e2b338a /docs/com | |
parent | b5ced1899ff13796eb0836ca75fddd1c787d8650 (diff) |
Add docstrings in unit
It also adds shebang and conforms the copyright header with the related
OPNFV template.
Change-Id: Iacb0cc8629e3021181eef2e8cb76daf48601abf4
Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
Diffstat (limited to 'docs/com')
-rw-r--r-- | docs/com/pres/framework/framework.md | 56 |
1 files changed, 56 insertions, 0 deletions
diff --git a/docs/com/pres/framework/framework.md b/docs/com/pres/framework/framework.md index 3c1aae1b..1b07a8e0 100644 --- a/docs/com/pres/framework/framework.md +++ b/docs/com/pres/framework/framework.md @@ -252,6 +252,62 @@ run: +## class Suite +bases: TestCase + +base model for running unittest.TestSuite + + +### run(**kwargs) + +- allows running any unittest.TestSuite +- sets the following attributes required to push the results to DB: + - result + - start_time + - stop_time + - details + + + +## Your fourth test case + + +### fourth.py + +```python +#!/usr/bin/env python + +import unittest + +class TestStringMethods(unittest.TestCase): + + def test_upper(self): + self.assertEqual('Hello World'.upper(), + 'HELLO WORLD') +``` + + +### functest/ci/testcases.yaml + +``` +case_name: fourth +project_name: functest +criteria: 100 +blocking: true +clean_flag: false +description: '' +dependencies: + installer: '' + scenario: '' +run: + module: 'functest.core.unit' + class: 'Suite' + args: + name: 'fourth' +``` + + + ## Euphrates |