Skip to content

Debloat any Android or Google TV over Wi-Fi and get an Apple TV-style home.

tests: the cold-start accessibility test puts bench.other_app back

Andrew Borisenko7daccdf37c1e
diff --git a/tests/test_bench_accessibility.py b/tests/test_bench_accessibility.py
index e3297643c..b71b3a607 100644
--- a/tests/test_bench_accessibility.py
+++ b/tests/test_bench_accessibility.py
@@ -17,6 +17,7 @@ Run from the repository root:
python -m unittest tests.test_bench_accessibility -v
"""
import unittest
+from unittest import mock
from tools import bench
@@ -97,11 +98,8 @@ class ColdStartOrderTest(unittest.TestCase):
return out
tv.shell = shell_with_start
- bench.other_app = lambda _tv: "com.android.tv.settings/.MainSettings"
- try:
+ with mock.patch.object(bench, "other_app", lambda _tv: "com.android.tv.settings/.MainSettings"):
bench.cold_start(tv, "com.gathin.tvhome/.MainActivity", 1)
- finally:
- pass
self.assertIn("measure", order, order)
self.assertIn("restore", order, order)