mirror of
https://github.com/chatmail/relay.git
synced 2026-05-21 05:18:04 +00:00
formatting and fixture move
This commit is contained in:
11
tests/chatmaild/conftest.py
Normal file
11
tests/chatmaild/conftest.py
Normal file
@@ -0,0 +1,11 @@
|
|||||||
|
|
||||||
|
import pytest
|
||||||
|
from chatmaild.database import Database
|
||||||
|
|
||||||
|
|
||||||
|
@pytest.fixture()
|
||||||
|
def db(tmpdir):
|
||||||
|
db_path = tmpdir / "passdb.sqlite"
|
||||||
|
print("database path:", db_path)
|
||||||
|
return Database(db_path)
|
||||||
|
|
||||||
@@ -4,14 +4,7 @@ import pytest
|
|||||||
|
|
||||||
import chatmaild.dictproxy
|
import chatmaild.dictproxy
|
||||||
from chatmaild.dictproxy import get_user_data, lookup_passdb
|
from chatmaild.dictproxy import get_user_data, lookup_passdb
|
||||||
from chatmaild.database import Database, DBError
|
from chatmaild.database import DBError
|
||||||
|
|
||||||
|
|
||||||
@pytest.fixture()
|
|
||||||
def db(tmpdir):
|
|
||||||
db_path = tmpdir / "passdb.sqlite"
|
|
||||||
print("database path:", db_path)
|
|
||||||
return Database(db_path)
|
|
||||||
|
|
||||||
|
|
||||||
def test_basic(db, tmpdir, monkeypatch):
|
def test_basic(db, tmpdir, monkeypatch):
|
||||||
|
|||||||
Reference in New Issue
Block a user