From 99775458c4db555ce9e1b6488ede7a702ddb74bd Mon Sep 17 00:00:00 2001 From: link2xt Date: Thu, 4 Dec 2025 21:45:45 +0000 Subject: [PATCH] test: test setting up second device between core versions --- deltachat-rpc-client/tests/test_cross_core.py | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/deltachat-rpc-client/tests/test_cross_core.py b/deltachat-rpc-client/tests/test_cross_core.py index babad0e6e..31d39c790 100644 --- a/deltachat-rpc-client/tests/test_cross_core.py +++ b/deltachat-rpc-client/tests/test_cross_core.py @@ -42,3 +42,16 @@ def test_send_and_receive_message(alice_and_remote_bob) -> None: msg = alice.wait_for_incoming_msg() assert msg.get_snapshot().text == "hello" + + +def test_second_device(acfactory, alice_and_remote_bob) -> None: + """Test setting up current version as a second device for old version.""" + _alice, alice_contact_bob, remote_eval = alice_and_remote_bob("2.20.0") + + remote_eval("locals().setdefault('future', bob._rpc.provide_backup.future(bob.id))") + qr = remote_eval("bob._rpc.get_backup_qr(bob.id)") + new_account = acfactory.get_unconfigured_account() + new_account._rpc.get_backup(new_account.id, qr) + remote_eval("locals()['future']()") + + assert new_account.get_config("addr") == remote_eval("bob.get_config('addr')")