mirror of
https://github.com/chatmail/relay.git
synced 2026-05-10 16:04:37 +00:00
don't depend on deltachat python package
This commit is contained in:
@@ -3,6 +3,6 @@ set -e
|
||||
python3 -m venv venv
|
||||
pip=venv/bin/pip
|
||||
|
||||
$pip install pyinfra pytest build 'setuptools>=68' tox deltachat
|
||||
$pip install pyinfra pytest build 'setuptools>=68' tox
|
||||
$pip install -e deploy-chatmail
|
||||
$pip install -e chatmaild
|
||||
|
||||
@@ -278,13 +278,13 @@ class ChatmailTestProcess:
|
||||
|
||||
|
||||
@pytest.fixture
|
||||
def cmfactory(request, gencreds, tmpdir, data, maildomain):
|
||||
def cmfactory(request, gencreds, tmpdir, maildomain):
|
||||
# cloned from deltachat.testplugin.amfactory
|
||||
pytest.importorskip("deltachat")
|
||||
from deltachat.testplugin import ACFactory
|
||||
|
||||
testproc = ChatmailTestProcess(request.config, maildomain, gencreds)
|
||||
am = ACFactory(request=request, tmpdir=tmpdir, testprocess=testproc, data=data)
|
||||
am = ACFactory(request=request, tmpdir=tmpdir, testprocess=testproc, data=None)
|
||||
|
||||
# nb. a bit hacky
|
||||
# would probably be better if deltachat's test machinery grows native support
|
||||
@@ -326,6 +326,18 @@ class Remote:
|
||||
break
|
||||
|
||||
|
||||
@pytest.fixture
|
||||
def lp(request):
|
||||
class LP:
|
||||
def sec(self, msg):
|
||||
print(f"---- {msg} ----")
|
||||
|
||||
def indent(self, msg):
|
||||
print(f" {msg}")
|
||||
|
||||
return LP()
|
||||
|
||||
|
||||
@pytest.fixture
|
||||
def maildata(request, gencreds):
|
||||
datadir = conftestdir.joinpath("mail-data")
|
||||
|
||||
@@ -4,6 +4,7 @@ import importlib.resources
|
||||
from deploy_chatmail.www import build_webpages
|
||||
from deploy_chatmail import get_ini_settings
|
||||
|
||||
|
||||
def create_ini(inipath):
|
||||
inipath.write_text(
|
||||
textwrap.dedent(
|
||||
@@ -22,6 +23,7 @@ def create_ini(inipath):
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
def test_build_webpages(tmp_path):
|
||||
pkgroot = importlib.resources.files("deploy_chatmail")
|
||||
src_dir = pkgroot.joinpath("../../../www/src").resolve()
|
||||
|
||||
Reference in New Issue
Block a user