mirror of
https://github.com/borgbase/vorta
synced 2024-12-22 07:43:09 +00:00
23 lines
762 B
Python
23 lines
762 B
Python
"""
|
|
Test backup creation
|
|
"""
|
|
|
|
import pytest
|
|
from PyQt6 import QtCore
|
|
|
|
from vorta.store.models import ArchiveModel, EventLogModel
|
|
|
|
|
|
def test_create(qapp, qtbot, archive_env):
|
|
"""Test for manual archive creation"""
|
|
main, tab = archive_env
|
|
|
|
qtbot.mouseClick(main.createStartBtn, QtCore.Qt.MouseButton.LeftButton)
|
|
qtbot.waitUntil(lambda: 'Backup finished.' in main.progressText.text(), **pytest._wait_defaults)
|
|
qtbot.waitUntil(lambda: main.createStartBtn.isEnabled(), **pytest._wait_defaults)
|
|
|
|
assert EventLogModel.select().count() == 2
|
|
assert ArchiveModel.select().count() == 7
|
|
assert main.createStartBtn.isEnabled()
|
|
assert main.archiveTab.archiveTable.rowCount() == 7
|
|
assert main.scheduleTab.logPage.logPage.rowCount() == 2
|