aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorzhihui wu <wu.zhihui1@zte.com.cn>2016-12-16 02:13:54 +0000
committerGerrit Code Review <gerrit@opnfv.org>2016-12-16 02:13:54 +0000
commit38b1f656b4d3123b1f5a5fb612bc920a81cc4753 (patch)
tree48b9f9d5da41ecf35a30b2e04ec1216645338b3f
parent60ac5ecdd5c1dd4bd4f3d603dd5ad87de6856a7f (diff)
parent2ea5b33bab78dfc7608ed8980a9ec846e42098ab (diff)
Merge "Add unit test for `describe` method"
-rw-r--r--tests/unit/runner/perftest_test.py6
-rw-r--r--tests/unit/runner/suite_test.py6
-rw-r--r--tests/unit/runner/testplan_test.py6
3 files changed, 18 insertions, 0 deletions
diff --git a/tests/unit/runner/perftest_test.py b/tests/unit/runner/perftest_test.py
index 1f0b5631..2b400ac8 100644
--- a/tests/unit/runner/perftest_test.py
+++ b/tests/unit/runner/perftest_test.py
@@ -40,3 +40,9 @@ class TestPerfTest:
assert Property.DESCRIPTION in desc
assert Property.ABSPATH in desc
assert Property.ABSPATH is not None
+
+ def test_describe(self):
+ desc = PerfTest('test-a').describe()
+ assert Property.NAME in desc
+ assert Property.DESCRIPTION in desc
+ assert Property.ABSPATH in desc
diff --git a/tests/unit/runner/suite_test.py b/tests/unit/runner/suite_test.py
index 10205801..acfed82c 100644
--- a/tests/unit/runner/suite_test.py
+++ b/tests/unit/runner/suite_test.py
@@ -40,3 +40,9 @@ class TestSuite:
assert Property.DESCRIPTION in suite_desc
assert Property.ABSPATH in suite_desc
assert Property.ABSPATH is not None
+
+ def test_describe(self):
+ desc = Suite('suite-a').describe()
+ assert Property.NAME in desc
+ assert Property.DESCRIPTION in desc
+ assert Property.ABSPATH in desc
diff --git a/tests/unit/runner/testplan_test.py b/tests/unit/runner/testplan_test.py
index de8bf1e1..7e42f557 100644
--- a/tests/unit/runner/testplan_test.py
+++ b/tests/unit/runner/testplan_test.py
@@ -40,3 +40,9 @@ class TestTestPlan:
assert Property.DESCRIPTION in desc
assert Property.ABSPATH in desc
assert Property.ABSPATH is not None
+
+ def test_describe(self):
+ desc = TestPlan('plan-a').describe()
+ assert Property.NAME in desc
+ assert Property.DESCRIPTION in desc
+ assert Property.ABSPATH in desc