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

20 lines
347 B
Python
Raw Normal View History

2018-11-01 06:01:44 +00:00
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