Fix tests.

This commit is contained in:
Manu 2018-11-17 18:12:00 +08:00
parent bae80c9d57
commit 00de9c189b
3 changed files with 4 additions and 4 deletions

View File

@ -13,7 +13,7 @@ class BorgInitThread(BorgThread):
# Build fake profile because we don't have it in the DB yet.
profile = FakeProfile(
FakeRepo(params['repo_url'])
FakeRepo(params['repo_url']), 'Init Repo'
)
ret = super().prepare(profile)

View File

@ -18,7 +18,7 @@ def app(tmpdir, qtbot):
@pytest.fixture()
def app_with_repo(app):
profile = app.profile()
profile = app.main_window.current_profile
new_repo = RepoModel(url='i0fi93@i593.repo.borgbase.com:repo')
new_repo.save()
profile.repo = new_repo

View File

@ -6,7 +6,7 @@ def test_schedule_tab(app, qtbot):
main = app.main_window
tab = main.scheduleTab
qtbot.mouseClick(tab.scheduleApplyButton, QtCore.Qt.LeftButton)
assert tab.nextBackupDateTimeLabel.text() == 'Manual Backups'
assert tab.nextBackupDateTimeLabel.text() == 'None scheduled'
tab.scheduleIntervalRadio.setChecked(True)
tab.scheduleIntervalHours.setValue(5)
@ -16,7 +16,7 @@ def test_schedule_tab(app, qtbot):
tab.scheduleOffRadio.setChecked(True)
qtbot.mouseClick(tab.scheduleApplyButton, QtCore.Qt.LeftButton)
assert tab.nextBackupDateTimeLabel.text() == 'Manual Backups'
assert tab.nextBackupDateTimeLabel.text() == 'None scheduled'
tab.scheduleFixedRadio.setChecked(True)
tab.scheduleFixedTime.setTime(QtCore.QTime(23, 59))