summaryrefslogtreecommitdiffstats
path: root/dovetail/tests/unit/test_testcase.py
diff options
context:
space:
mode:
authorPanagiotis Karalis <panos.pkaralis@gmail.com>2019-08-07 10:46:52 +0300
committerDan Xu <xudan16@huawei.com>2019-09-16 06:45:00 +0000
commit005d868d68dbb0e70b3f92a685ea269c4f646fd7 (patch)
treedcb1f0f64606b58f0c33e9dc96131fdbe4ed6398 /dovetail/tests/unit/test_testcase.py
parentf0c44b1ae02ffbdb87da81dac7b6754c641d8c04 (diff)
Move the proj to python3
The aim of this patch is to upgrade python version of this project from python2 to python3. Signed-off-by: Panagiotis Karalis <panos.pkaralis@gmail.com> Change-Id: I3d3ef01176fda1b23a0542a24625be2f3368c40e
Diffstat (limited to 'dovetail/tests/unit/test_testcase.py')
-rw-r--r--dovetail/tests/unit/test_testcase.py10
1 files changed, 5 insertions, 5 deletions
diff --git a/dovetail/tests/unit/test_testcase.py b/dovetail/tests/unit/test_testcase.py
index fc949fee..81a8de39 100644
--- a/dovetail/tests/unit/test_testcase.py
+++ b/dovetail/tests/unit/test_testcase.py
@@ -248,7 +248,7 @@ class TestcaseTesting(unittest.TestCase):
'Test case: {} post_condition is empty.'.format(testcase.name()))
self.assertEqual(False, result)
- @patch('__builtin__.open')
+ @patch('builtins.open')
@patch('dovetail.testcase.os.path')
@patch('dovetail.testcase.dt_cfg')
@patch.object(tcase.Testcase, 'sub_testcase')
@@ -274,7 +274,7 @@ class TestcaseTesting(unittest.TestCase):
'Save test cases to {}'.format(file_path))
self.assertEqual(file_path, result)
- @patch('__builtin__.open')
+ @patch('builtins.open')
@patch('dovetail.testcase.os.path')
@patch('dovetail.testcase.dt_cfg')
@patch.object(tcase.Testcase, 'sub_testcase')
@@ -351,7 +351,7 @@ class TestcaseTesting(unittest.TestCase):
result = testcase.increase_retry()
self.assertEqual(42, result)
- @patch('__builtin__.open')
+ @patch('builtins.open')
@patch('dovetail.testcase.yaml')
@patch('dovetail.testcase.os')
@patch('dovetail.testcase.TestcaseFactory')
@@ -378,7 +378,7 @@ class TestcaseTesting(unittest.TestCase):
mock_factory.create.assert_called_once_with('value', yaml_dict)
self.assertEqual(runner_obj, tcase.Testcase.get('key'))
- @patch('__builtin__.open')
+ @patch('builtins.open')
@patch('dovetail.testcase.yaml')
@patch('dovetail.testcase.os')
@patch('dovetail.testcase.TestcaseFactory')
@@ -624,7 +624,7 @@ class TestcaseTesting(unittest.TestCase):
self.assertEqual(None, result)
- @patch('__builtin__.open')
+ @patch('builtins.open')
@patch('dovetail.testcase.yaml')
@patch('dovetail.testcase.os')
@patch('dovetail.testcase.constants')