We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent ff17d79 commit 038a848Copy full SHA for 038a848
tests/components/androidtv/patchers.py
@@ -1,5 +1,6 @@
1
"""Define patches used for androidtv tests."""
2
3
+import os.path
4
from typing import Any
5
from unittest.mock import patch
6
@@ -12,6 +13,8 @@
12
13
DEVICE_FIRETV,
14
)
15
16
+_original_isfile = os.path.isfile
17
+
18
ADB_SERVER_HOST = "127.0.0.1"
19
KEY_PYTHON = "python"
20
KEY_SERVER = "server"
@@ -185,7 +188,9 @@ def patch_androidtv_update(
185
188
186
189
def isfile(filepath):
187
190
"""Mock `os.path.isfile`."""
- return filepath.endswith("adbkey")
191
+ if str(filepath).endswith("adbkey"):
192
+ return True
193
+ return _original_isfile(filepath)
194
195
196
PATCH_SCREENCAP = patch(
0 commit comments