mirror of
https://github.com/chatmail/relay.git
synced 2026-05-11 08:24:37 +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
|
||||
from chatmaild.dictproxy import get_user_data, lookup_passdb
|
||||
from chatmaild.database import Database, DBError
|
||||
|
||||
|
||||
@pytest.fixture()
|
||||
def db(tmpdir):
|
||||
db_path = tmpdir / "passdb.sqlite"
|
||||
print("database path:", db_path)
|
||||
return Database(db_path)
|
||||
from chatmaild.database import DBError
|
||||
|
||||
|
||||
def test_basic(db, tmpdir, monkeypatch):
|
||||
|
||||
Reference in New Issue
Block a user