From 005d868d68dbb0e70b3f92a685ea269c4f646fd7 Mon Sep 17 00:00:00 2001 From: Panagiotis Karalis Date: Wed, 7 Aug 2019 10:46:52 +0300 Subject: 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 Change-Id: I3d3ef01176fda1b23a0542a24625be2f3368c40e --- dovetail/tests/unit/test_testcase.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'dovetail/tests/unit/test_testcase.py') 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') -- cgit 1.2.3-korg