Skip to content

Commit 6b895c4

Browse files
committed
Update tests and fix formating
1 parent 1113cb8 commit 6b895c4

File tree

3 files changed

+18
-6
lines changed

3 files changed

+18
-6
lines changed

openandroidinstaller/openandroidinstaller.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -230,13 +230,13 @@ def main(page: Page, test: bool = False, test_config: str = "sargo"):
230230

231231
# header
232232
page.appbar = AppBar(
233-
leading=Image(
234-
src="/logo-192x192.png", height=40, width=40, border_radius=40
235-
),
233+
leading=Image(src="/logo-192x192.png", height=40, width=40, border_radius=40),
236234
leading_width=56,
237235
toolbar_height=72,
238236
elevation=0,
239-
title=Text(f"OpenAndroidInstaller version {VERSION}"), #, style="displaySmall"),
237+
title=Text(
238+
f"OpenAndroidInstaller version {VERSION}"
239+
), # , style="displaySmall"),
240240
center_title=False,
241241
bgcolor="#00d886",
242242
actions=[

openandroidinstaller/tooling.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -368,12 +368,14 @@ def fastboot_unlock(bin_path: Path) -> TerminalResponse:
368368
for line in run_command("fastboot flashing unlock", bin_path):
369369
yield line
370370

371+
371372
@add_logging("Critically unlocking the device with fastboot without code.")
372373
def fastboot_unlock_critical(bin_path: Path) -> TerminalResponse:
373374
"""Unlock critical the device with fastboot and without code."""
374375
for line in run_command("fastboot flashing unlock_critical", bin_path):
375376
yield line
376377

378+
377379
@add_logging("OEM unlocking the device with fastboot.")
378380
def fastboot_oem_unlock(bin_path: Path) -> TerminalResponse:
379381
"""OEM unlock the device with fastboot and without code."""

tests/test_app.py

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,12 @@ def test_app_sargo():
4646
number_of_steps = 14
4747
for _ in range(number_of_steps):
4848
page.controls[0].to_next_view(None)
49-
assert "SuccessView" in str(page.controls[0].view.controls[0])
49+
assert "Installation completed successfully!" in str(
50+
page.controls[0]
51+
.view.controls[0]
52+
.right_view_header.controls[0]
53+
.content.controls[0]
54+
)
5055

5156

5257
def test_app_beyond2lte():
@@ -61,4 +66,9 @@ def test_app_beyond2lte():
6166
number_of_steps = 14
6267
for _ in range(number_of_steps):
6368
page.controls[0].to_next_view(None)
64-
assert "SuccessView" in str(page.controls[0].view.controls[0])
69+
assert "Installation completed successfully!" in str(
70+
page.controls[0]
71+
.view.controls[0]
72+
.right_view_header.controls[0]
73+
.content.controls[0]
74+
)

0 commit comments

Comments
 (0)