summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorguantion <guantion@bd.dev>2020-03-20 22:37:11 +0800
committerguantion <guantion@bd.dev>2020-03-20 22:37:11 +0800
commit4b12452a35d7d7bbf824765015333cab3143fe52 (patch)
treefbd417bbd5f6d3ac0510b393959774138815955d
parent3b6b86521b6617ee45d06a06adf533c46bb570d0 (diff)
downloadvdebug-4b12452a35d7d7bbf824765015333cab3143fe52.zip
update test
-rw-r--r--tests/test_log.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/tests/test_log.py b/tests/test_log.py
index 821f620..b68fa7c 100644
--- a/tests/test_log.py
+++ b/tests/test_log.py
@@ -89,7 +89,7 @@ class FileLoggerTest(unittest.TestCase):
def test_log_opens_file(self):
with mock.patch(self.open_name, mock.mock_open()) as mocked_open:
self.logger.log('text', self.level)
- mocked_open.assert_called_once_with(self.filename, 'w')
+ mocked_open.assert_called_once_with(self.filename, 'w', encoding='utf-8')
handle = mocked_open()
if sys.version_info[0] >= 3 and sys.version_info[1] >= 6:
handle.write.assert_called_once()
@@ -115,6 +115,6 @@ class FileLoggerTest(unittest.TestCase):
with mock.patch(self.open_name, mock.mock_open()) as mocked_open:
self.logger.log('text', self.level)
self.logger.shutdown()
- mocked_open.assert_called_once_with(self.filename, 'w')
+ mocked_open.assert_called_once_with(self.filename, 'w', encoding='utf-8')
handle = mocked_open()
handle.close.assert_called_once_with()