1
0
Fork 0
mirror of https://github.com/borgbase/vorta synced 2024-12-23 00:07:58 +00:00

Avoid starting Borg thread at the end of test. (#465)

This commit is contained in:
Manu 2020-05-22 20:49:04 +08:00 committed by GitHub
parent a765c32681
commit 4c50c99a4c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -101,12 +101,10 @@ def psutil_disk_partitions(**kwargs):
)
qtbot.mouseClick(tab.mountButton, QtCore.Qt.LeftButton)
qtbot.waitUntil(lambda: tab.mountErrors.text().startswith('Mounted'), timeout=5000)
qtbot.waitUntil(lambda: tab.mountErrors.text().startswith('Mounted'), timeout=10000)
qtbot.mouseClick(tab.mountButton, QtCore.Qt.LeftButton)
# qtbot.waitUntil(lambda: tab.mountErrors.text() == 'No active Borg mounts found.')
qtbot.waitUntil(lambda: tab.mountErrors.text().startswith('Un-mounted successfully.'), timeout=5000)
qtbot.waitUntil(lambda: tab.mountErrors.text().startswith('Un-mounted successfully.'), timeout=10000)
def test_archive_extract(qapp, qtbot, mocker, borg_json_output, monkeypatch):
@ -127,12 +125,11 @@ def test_archive_extract(qapp, qtbot, mocker, borg_json_output, monkeypatch):
mocker.patch.object(vorta.borg.borg_thread, 'Popen', return_value=popen_result)
qtbot.mouseClick(tab.extractButton, QtCore.Qt.LeftButton)
qtbot.waitUntil(lambda: hasattr(tab, '_window'), timeout=5000)
qtbot.waitUntil(lambda: hasattr(tab, '_window'), timeout=10000)
assert tab._window.treeView.model().rootItem.childItems[0].data(0) == 'Users'
tab._window.treeView.model().rootItem.childItems[0].load_children()
assert tab._window.archiveNameLabel.text().startswith('test-archive, 2000')
tab._window.accept()
def test_archive_diff(qapp, qtbot, mocker, borg_json_output, monkeypatch):