Skip to content

Commit 1f1a29b

Browse files
committed
test: online test for legacy Secure-Join key request
1 parent 80545df commit 1f1a29b

1 file changed

Lines changed: 10 additions & 1 deletion

File tree

deltachat-rpc-client/tests/test_cross_core.py

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ def test_install_venv_and_use_other_core(tmp_path, get_core_python_env):
1616

1717

1818
@pytest.mark.parametrize("version", ["2.24.0"])
19-
def test_qr_setup_contact(alice_and_remote_bob, version) -> None:
19+
def test_qr_setup_contact(acfactory, alice_and_remote_bob, version) -> None:
2020
"""Test other-core Bob profile can do securejoin with Alice on current core."""
2121
alice, alice_contact_bob, remote_eval = alice_and_remote_bob(version)
2222

@@ -33,6 +33,15 @@ def test_qr_setup_contact(alice_and_remote_bob, version) -> None:
3333
# Test that Bob verified Alice's profile.
3434
assert remote_eval("bob_contact_alice.get_snapshot().is_verified")
3535

36+
# Test that Bob can also scan a QR code
37+
# of Alice for which the key is not known yet.
38+
# For the test above Bob already knew the key from a vCard.
39+
alice2 = acfactory.get_online_account()
40+
qr_code = alice2.get_qr_code()
41+
remote_eval(f"bob.secure_join({qr_code!r})")
42+
remote_eval("bob.wait_for_securejoin_joiner_success()")
43+
alice2.wait_for_securejoin_inviter_success()
44+
3645

3746
def test_send_and_receive_message(alice_and_remote_bob) -> None:
3847
"""Test other-core Bob profile can send a message to Alice on current core."""

0 commit comments

Comments
 (0)