From f5bfa6bd565976b92ef9865579f815d462749538 Mon Sep 17 00:00:00 2001 From: link2xt Date: Thu, 21 Dec 2023 19:14:20 +0000 Subject: [PATCH] test: test scanning QR code --- cmdeploy/src/cmdeploy/tests/online/test_0_qr.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/cmdeploy/src/cmdeploy/tests/online/test_0_qr.py b/cmdeploy/src/cmdeploy/tests/online/test_0_qr.py index 57167e6..e3b662e 100644 --- a/cmdeploy/src/cmdeploy/tests/online/test_0_qr.py +++ b/cmdeploy/src/cmdeploy/tests/online/test_0_qr.py @@ -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)