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