From a5cff5bc3d5aad890afed37113b904fdaa7809da Mon Sep 17 00:00:00 2001 From: MirceaDan Date: Sat, 1 Dec 2018 12:19:30 -0800 Subject: [PATCH] this file must be opened in text mode the version file must be read in text mode --- tests/plugins/pi_support/test_pi_support.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/plugins/pi_support/test_pi_support.py b/tests/plugins/pi_support/test_pi_support.py index 3c68d6ded..b0449bf07 100644 --- a/tests/plugins/pi_support/test_pi_support.py +++ b/tests/plugins/pi_support/test_pi_support.py @@ -21,7 +21,7 @@ class PiSupportTestCase(unittest.TestCase): m.return_value.readline.return_value = OCTOPI_VERSION version = get_octopi_version() - m.assert_called_once_with("/etc/octopi_version", "rb") + m.assert_called_once_with('/etc/octopi_version', 'rt', encoding='utf-8') self.assertEqual(version, OCTOPI_VERSION) def test_get_proc_dt_model(self): @@ -32,7 +32,7 @@ class PiSupportTestCase(unittest.TestCase): m.return_value.readline.return_value = DT_MODEL model = get_proc_dt_model() - m.assert_called_once_with("/proc/device-tree/model", "rb") + m.assert_called_once_with('/proc/device-tree/model', 'rt', encoding='utf-8') self.assertEqual(model, DT_MODEL) def test_get_vcgencmd_throttle_state(self):