aboutsummaryrefslogtreecommitdiffstats
path: root/functest/tests/unit
diff options
context:
space:
mode:
authorMorgan Richomme <morgan.richomme@orange.com>2016-11-24 15:58:12 +0100
committerMorgan Richomme <morgan.richomme@orange.com>2016-11-24 15:58:12 +0100
commitb3c31aac45338837d9392ef69ffa76029dd1db88 (patch)
tree059d3aa9719a803f0aef9afadd9ffa47b67baa57 /functest/tests/unit
parent7a776398ef8b17bd9af5367d712707a903c1c86a (diff)
Consider criteria as exit condition in odl test
JIRA: FUNCTEST-621 Change-Id: Ic9dd73861d84e3dbfb3e6611ffc9e5e2c09fcaed Signed-off-by: Morgan Richomme <morgan.richomme@orange.com>
Diffstat (limited to 'functest/tests/unit')
-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 3f33dc88..a62bf39e 100644
--- a/functest/tests/unit/odl/test_odl.py
+++ b/functest/tests/unit/odl/test_odl.py
@@ -201,7 +201,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')
@@ -210,7 +211,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')
@@ -219,7 +221,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)
@@ -228,7 +231,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):