1
0
Fork 0
mirror of https://github.com/borgbase/vorta synced 2024-12-23 16:26:55 +00:00
vorta/tests/fixtures.py
2018-11-01 14:01:44 +08:00

19 lines
347 B
Python

import pytest
import peewee
import vorta
from vorta.application import VortaApp
@pytest.fixture()
def app(tmpdir):
tmp_db = tmpdir.join('settings.sqlite')
mock_db = peewee.SqliteDatabase(str(tmp_db))
vorta.models.init_db(mock_db)
return VortaApp([])
@pytest.fixture()
def main(app):
main = app.main_window
return main