this file must be opened in text mode
the version file must be read in text mode
This commit is contained in:
1 parent
a4bff305b3
commit
a5cff5bc3d
1 file changed
+2
-2
@@ -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):
|
||||
|
||||
Reference in new issue
Block a user