aboutsummaryrefslogtreecommitdiffstats
path: root/functest/tests
diff options
context:
space:
mode:
authorMorgan Richomme <morgan.richomme@orange.com>2016-11-25 07:04:56 +0000
committerGerrit Code Review <gerrit@opnfv.org>2016-11-25 07:04:56 +0000
commite2de95f657cdeabd5c6aa4decaaee39e69f0ca32 (patch)
treed998a2ecf553b96f2d51d10ae89eceae7a9ca2b9 /functest/tests
parent428bc342e7e4d6cb1c6123c3b611b78b9fea068d (diff)
parentb3c31aac45338837d9392ef69ffa76029dd1db88 (diff)
Merge "Consider criteria as exit condition in odl test"
Diffstat (limited to 'functest/tests')
-rw-r--r--functest/tests/unit/odl/test_odl.py12
1 files changed, 8 insertions, 4 deletions
diff --git a/functest/tests/unit/odl/test_odl.py b/functest/tests/unit/odl/test_odl.py
index 065298d6..fdd45763 100644
--- a/functest/tests/unit/odl/test_odl.py
+++ b/functest/tests/unit/odl/test_odl.py
@@ -200,7 +200,8 @@ class ODLTestCasesTesting(unittest.TestCase):
def test_main(self, *args):
with mock.patch.object(self.test, 'set_robotframework_vars',
return_value=True), \
- mock.patch.object(self.test, 'parse_results'):
+ mock.patch.object(self.test, 'parse_results',
+ return_value="PASS"):
self._test_main(TestCasesBase.TestCasesBase.EX_OK, *args)
@mock.patch('os.remove')
@@ -209,7 +210,8 @@ class ODLTestCasesTesting(unittest.TestCase):
def test_main_makedirs_oserror17(self, *args):
with mock.patch.object(self.test, 'set_robotframework_vars',
return_value=True), \
- mock.patch.object(self.test, 'parse_results'):
+ mock.patch.object(self.test, 'parse_results',
+ return_value="PASS"):
self._test_main(TestCasesBase.TestCasesBase.EX_OK, *args)
@mock.patch('os.remove')
@@ -218,7 +220,8 @@ class ODLTestCasesTesting(unittest.TestCase):
def test_main_testcases_in_failure(self, *args):
with mock.patch.object(self.test, 'set_robotframework_vars',
return_value=True), \
- mock.patch.object(self.test, 'parse_results'):
+ mock.patch.object(self.test, 'parse_results',
+ return_value="PASS"):
self._test_main(TestCasesBase.TestCasesBase.EX_OK, *args)
@mock.patch('os.remove', side_effect=OSError)
@@ -227,7 +230,8 @@ class ODLTestCasesTesting(unittest.TestCase):
def test_main_remove_oserror(self, *args):
with mock.patch.object(self.test, 'set_robotframework_vars',
return_value=True), \
- mock.patch.object(self.test, 'parse_results'):
+ mock.patch.object(self.test, 'parse_results',
+ return_value="PASS"):
self._test_main(TestCasesBase.TestCasesBase.EX_OK, *args)
def _test_run_missing_env_var(self, var):