Commit 562e59b 1 parent c864678 commit 562e59b Copy full SHA for 562e59b
File tree 1 file changed +13
-1
lines changed
deltachat-rpc-client/tests
1 file changed +13
-1
lines changed Original file line number Diff line number Diff line change 3
3
from deltachat_rpc_client import Chat , SpecialContactId
4
4
5
5
6
- def test_qr_setup_contact (acfactory ) -> None :
6
+ def test_qr_setup_contact (acfactory , tmp_path ) -> None :
7
7
alice , bob = acfactory .get_online_accounts (2 )
8
8
9
9
qr_code , _svg = alice .get_qr_code ()
@@ -23,6 +23,18 @@ def test_qr_setup_contact(acfactory) -> None:
23
23
bob_contact_alice_snapshot = bob_contact_alice .get_snapshot ()
24
24
assert bob_contact_alice_snapshot .is_verified
25
25
26
+ # Test that if Bob changes the key, backwards verification is lost.
27
+ logging .info ("Bob 2 is created" )
28
+ bob2 = acfactory .new_configured_account ()
29
+ bob2 .export_self_keys (tmp_path )
30
+
31
+ logging .info ("Bob imports a key" )
32
+ bob .import_self_keys (tmp_path / "private-key-default.asc" )
33
+
34
+ assert bob .get_config ("key_id" ) == "2"
35
+ bob_contact_alice_snapshot = bob_contact_alice .get_snapshot ()
36
+ assert not bob_contact_alice_snapshot .is_verified
37
+
26
38
27
39
def test_qr_securejoin (acfactory ):
28
40
alice , bob = acfactory .get_online_accounts (2 )
You can’t perform that action at this time.
0 commit comments