def _create_session(self): alice = Account() bob = Account() bob.generate_one_time_keys(1) id_key = bob.identity_keys["curve25519"] one_time = list(bob.one_time_keys["curve25519"].values())[0] session = OutboundSession(alice, id_key, one_time) return alice, bob, session
def test_publish_one_time_keys(self): alice = Account() alice.generate_one_time_keys(10) one_time_keys = alice.one_time_keys assert one_time_keys assert len(one_time_keys["curve25519"]) == 10 alice.mark_keys_as_published() assert not alice.one_time_keys["curve25519"]
def test_one_time_keys(self): alice = Account() alice.generate_one_time_keys(10) one_time_keys = alice.one_time_keys assert one_time_keys assert len(one_time_keys["curve25519"]) == 10