Skip to content

Commit 3681bc4

Browse files
committed
💚 Fix unit tests
1 parent f2de034 commit 3681bc4

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

tests/test_pi_support.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212

1313
VCGENCMD = "/usr/bin/vcgencmd get_throttled"
1414

15-
OPEN_SIGNATURE = "io.open"
15+
OPEN_SIGNATURE = "builtins.open"
1616

1717

1818
class PiSupportTestCase(unittest.TestCase):
@@ -25,7 +25,7 @@ def test_get_octopi_version(self):
2525
m.return_value.readline.return_value = OCTOPI_VERSION
2626
version = get_octopi_version()
2727

28-
m.assert_called_once_with("/etc/octopi_version", "rt", encoding="utf-8")
28+
m.assert_called_once_with("/etc/octopi_version", encoding="utf-8")
2929
self.assertEqual(version, OCTOPI_VERSION)
3030

3131
def test_get_octopiuptodate_build(self):
@@ -35,7 +35,7 @@ def test_get_octopiuptodate_build(self):
3535
m.return_value.readline.return_value = OCTOPI_UPTODATE_BUILD
3636
build = get_octopiuptodate_build()
3737

38-
m.assert_called_once_with("/etc/octopiuptodate_build", "rt", encoding="utf-8")
38+
m.assert_called_once_with("/etc/octopiuptodate_build", encoding="utf-8")
3939
self.assertEqual(build, OCTOPI_UPTODATE_BUILD)
4040

4141
def test_get_proc_dt_model(self):
@@ -45,7 +45,7 @@ def test_get_proc_dt_model(self):
4545
m.return_value.readline.return_value = DT_MODEL
4646
model = get_proc_dt_model()
4747

48-
m.assert_called_once_with("/proc/device-tree/model", "rt", encoding="utf-8")
48+
m.assert_called_once_with("/proc/device-tree/model", encoding="utf-8")
4949
self.assertEqual(model, DT_MODEL)
5050

5151
def test_get_vcgencmd_throttle_state(self):

0 commit comments

Comments
 (0)