test: test scanning QR code

This commit is contained in:
link2xt 2023-12-21 19:14:20 +00:00
parent 81a6f8808b
commit f5bfa6bd56

View File

@ -14,3 +14,12 @@ def test_fastcgi_working(maildomain, chatmail_config):
res = requests.post(url)
assert maildomain in res.json().get("email")
assert len(res.json().get("password")) > chatmail_config.password_min_length
def test_newemail_configure(maildomain, rpc):
"""Test configuring accounts by scanning a QR code works."""
url = f"DCACCOUNT:https://{maildomain}/cgi-bin/newemail.py"
for i in range(3):
account_id = rpc.add_account()
rpc.set_config_from_qr(account_id, url)
rpc.configure(account_id)