aboutsummaryrefslogtreecommitdiffstats
path: root/functest/tests
diff options
context:
space:
mode:
authorCedric Ollivier <ollivier.cedric@gmail.com>2017-03-27 07:21:45 +0000
committerGerrit Code Review <gerrit@opnfv.org>2017-03-27 07:21:45 +0000
commit8d177dd1ac61078cb4134a1ff925ce25a777f5a0 (patch)
treedec97ebe05f01e653580bd6ade40572c39fb20ee /functest/tests
parent02d4be03f24ec45bdb77c2dc4cc3ebd46fdb5ee4 (diff)
parente7440f39c66121cf915f156897c0a7d0e2af2951 (diff)
Merge "Fix pylint warnings in test_testcase_base"
Diffstat (limited to 'functest/tests')
-rw-r--r--functest/tests/unit/core/test_testcase_base.py11
1 files changed, 6 insertions, 5 deletions
diff --git a/functest/tests/unit/core/test_testcase_base.py b/functest/tests/unit/core/test_testcase_base.py
index b7c81d87..182da6ea 100644
--- a/functest/tests/unit/core/test_testcase_base.py
+++ b/functest/tests/unit/core/test_testcase_base.py
@@ -8,9 +8,10 @@
# http://www.apache.org/licenses/LICENSE-2.0
import logging
-import mock
import unittest
+import mock
+
from functest.core import testcase_base
@@ -33,7 +34,7 @@ class TestcaseBaseTesting(unittest.TestCase):
@mock.patch('functest.utils.functest_utils.push_results_to_db',
return_value=False)
- def _test_missing_attribute(self, mock_function):
+ def _test_missing_attribute(self, mock_function=None):
self.assertEqual(self.test.push_to_db(),
testcase_base.TestcaseBase.EX_PUSH_TO_DB_ERROR)
mock_function.assert_not_called()
@@ -56,7 +57,7 @@ class TestcaseBaseTesting(unittest.TestCase):
@mock.patch('functest.utils.functest_utils.push_results_to_db',
return_value=True)
- def test_missing_details(self, mock_function):
+ def test_missing_details(self, mock_function=None):
self.test.details = None
self.assertEqual(self.test.push_to_db(),
testcase_base.TestcaseBase.EX_OK)
@@ -66,7 +67,7 @@ class TestcaseBaseTesting(unittest.TestCase):
@mock.patch('functest.utils.functest_utils.push_results_to_db',
return_value=False)
- def test_push_to_db_failed(self, mock_function):
+ def test_push_to_db_failed(self, mock_function=None):
self.assertEqual(self.test.push_to_db(),
testcase_base.TestcaseBase.EX_PUSH_TO_DB_ERROR)
mock_function.assert_called_once_with(
@@ -75,7 +76,7 @@ class TestcaseBaseTesting(unittest.TestCase):
@mock.patch('functest.utils.functest_utils.push_results_to_db',
return_value=True)
- def test_push_to_db(self, mock_function):
+ def test_push_to_db(self, mock_function=None):
self.assertEqual(self.test.push_to_db(),
testcase_base.TestcaseBase.EX_OK)
mock_function.assert_called_once_with(