def test_wrong_passphrase_pickle(self): alice = Account() passphrase = "It's a secret to everybody" pickle = alice.pickle(passphrase) with pytest.raises(OlmAccountError): Account.from_pickle(pickle, "")
def test_passphrase_pickle(self): alice = Account() passphrase = "It's a secret to everybody" pickle = alice.pickle(passphrase) assert (alice.identity_keys == Account.from_pickle( pickle, passphrase).identity_keys)
def test_account_pickle(self): alice = Account() pickle = alice.pickle() assert (alice.identity_keys == Account.from_pickle(pickle) .identity_keys)