From dfcddea581a4270ac95dc9ef3169d79381ce0350 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gina=20H=C3=A4u=C3=9Fge?= Date: Tue, 19 Feb 2019 13:28:15 +0100 Subject: [PATCH] =?UTF-8?q?=F0=9F=8E=A8=20Fix=20some=20whitespace=20issues?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- tests/filemanager/test_filemanager.py | 30 +++++++++++++-------------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/tests/filemanager/test_filemanager.py b/tests/filemanager/test_filemanager.py index 32736acdb..047dfb91c 100644 --- a/tests/filemanager/test_filemanager.py +++ b/tests/filemanager/test_filemanager.py @@ -329,24 +329,24 @@ class FileManagerTest(unittest.TestCase): @mock.patch("os.path.isfile", return_value=True) def test_get_recovery_data(self, mock_isfile): - import os - import yaml - recovery_file = os.path.join("/path/to/a/base_folder", "print_recovery_data.yaml") + import os + import yaml + recovery_file = os.path.join("/path/to/a/base_folder", "print_recovery_data.yaml") - data = dict(path="some_path.gco", - origin="local", - pos=1234, - date=123456789) - text_data = yaml.dump(data) + data = dict(path="some_path.gco", + origin="local", + pos=1234, + date=123456789) + text_data = yaml.dump(data) - with mock.patch("__builtin__.open", mock.mock_open(read_data=text_data)) as m: - # moved safe_load to here so we could mock up the return value properly - with mock.patch("yaml.safe_load", return_value=data) as n: - result = self.file_manager.get_recovery_data() + with mock.patch("__builtin__.open", mock.mock_open(read_data=text_data)) as m: + # moved safe_load to here so we could mock up the return value properly + with mock.patch("yaml.safe_load", return_value=data) as n: + result = self.file_manager.get_recovery_data() - self.assertDictEqual(data, result) - n.assert_called_with(m()) - mock_isfile.assert_called_with(recovery_file) + self.assertDictEqual(data, result) + n.assert_called_with(m()) + mock_isfile.assert_called_with(recovery_file) @mock.patch("os.path.isfile") def test_get_recovery_data_no_file(self, mock_isfile):