Skip to content

Commit 294bbed

Browse files
committed
fix(tests): stub component_stubs in svc fixture; test _do_update directly after confirm dialog; trim .gitignor
1 parent 7731849 commit 294bbed

2 files changed

Lines changed: 5 additions & 1 deletion

File tree

tests/updater/conftest.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,9 @@ def svc():
5656
mock_svc.has_component = MagicMock(
5757
side_effect=lambda n: any(c.name == n for c in mock_svc._components)
5858
)
59+
mock_svc.component_stubs = MagicMock(
60+
side_effect=lambda: [(c.name, c.kind) for c in mock_svc._components]
61+
)
5962
s = UpdaterDbusService.__new__(UpdaterDbusService)
6063
s._svc = mock_svc
6164
s._busy = False

tests/widgets/test_update_page_unit.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -334,8 +334,9 @@ def test_false_stops_busy_timeout_timer(self, page):
334334

335335
class TestUpdateAllClicked:
336336
def test_emits_request_update_with_empty_string(self, page, qtbot):
337+
# on_update_all_clicked shows a confirm dialog; _do_update fires the signal
337338
with qtbot.waitSignal(page.request_update, timeout=200) as blocker:
338-
page.on_update_all_clicked()
339+
page._do_update()
339340
assert blocker.args == [""]
340341

341342

0 commit comments

Comments
 (0)