From 607be55548f1b3a3cf9594ac7c01acaef139b78f Mon Sep 17 00:00:00 2001 From: Manu Date: Tue, 20 Nov 2018 14:50:26 +0800 Subject: [PATCH] Adjust test for (fast) travisci. --- tests/test_repo.py | 1 + tests/test_snapshots.py | 4 +--- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/tests/test_repo.py b/tests/test_repo.py index 8717f62c..24013ed4 100644 --- a/tests/test_repo.py +++ b/tests/test_repo.py @@ -55,6 +55,7 @@ def test_create(app_with_repo, borg_json_output, mocker, qtbot): assert EventLogModel.select().count() == 1 assert SnapshotModel.select().count() == 1 assert RepoModel.get(id=1).unique_size == 15520474 + qtbot.waitUntil(lambda: main.createStartBtn.isEnabled()) assert main.createStartBtn.isEnabled() assert main.snapshotTab.snapshotTable.rowCount() == 1 assert main.scheduleTab.logTableWidget.rowCount() == 1 diff --git a/tests/test_snapshots.py b/tests/test_snapshots.py index 3dea5c3c..8d39883a 100644 --- a/tests/test_snapshots.py +++ b/tests/test_snapshots.py @@ -32,9 +32,7 @@ def test_repo_list(app_with_repo, qtbot, mocker, borg_json_output): returncode=0) mocker.patch.object(vorta.borg.borg_thread, 'Popen', return_value=popen_result) - with qtbot.waitSignal(app_with_repo.backup_finished_event, timeout=3000) as blocker: - pass - + qtbot.waitUntil(lambda: main.createProgressText.text() == 'Refreshing snapshots done.') assert SnapshotModel.select().count() == 6 assert main.createProgressText.text() == 'Refreshing snapshots done.' assert tab.checkButton.isEnabled()