Skip to content

Commit 9977545

Browse files
committed
test: test setting up second device between core versions
1 parent e432960 commit 9977545

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

deltachat-rpc-client/tests/test_cross_core.py

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,3 +42,16 @@ def test_send_and_receive_message(alice_and_remote_bob) -> None:
4242

4343
msg = alice.wait_for_incoming_msg()
4444
assert msg.get_snapshot().text == "hello"
45+
46+
47+
def test_second_device(acfactory, alice_and_remote_bob) -> None:
48+
"""Test setting up current version as a second device for old version."""
49+
_alice, alice_contact_bob, remote_eval = alice_and_remote_bob("2.20.0")
50+
51+
remote_eval("locals().setdefault('future', bob._rpc.provide_backup.future(bob.id))")
52+
qr = remote_eval("bob._rpc.get_backup_qr(bob.id)")
53+
new_account = acfactory.get_unconfigured_account()
54+
new_account._rpc.get_backup(new_account.id, qr)
55+
remote_eval("locals()['future']()")
56+
57+
assert new_account.get_config("addr") == remote_eval("bob.get_config('addr')")

0 commit comments

Comments
 (0)