crypto: Refactor some tests.

master
Damir Jelić 2020-09-08 16:17:17 +02:00
parent 70ffc43ce0
commit 14226c0778
1 changed files with 2 additions and 8 deletions

View File

@ -870,19 +870,13 @@ pub(crate) mod test {
#[test] #[test]
fn other_identity_create() { fn other_identity_create() {
let user_id = user_id!("@example2:localhost"); get_other_identity();
let response = other_key_query();
let master_key = response.master_keys.get(&user_id).unwrap();
let self_signing = response.self_signing_keys.get(&user_id).unwrap();
UserIdentity::new(master_key.into(), self_signing.into()).unwrap();
} }
#[test] #[test]
fn own_identity_check_signatures() { fn own_identity_check_signatures() {
let response = own_key_query(); let response = own_key_query();
let identity = own_identity(&response); let identity = get_own_identity();
let (first, second) = device(&response); let (first, second) = device(&response);
assert!(identity.is_device_signed(&first).is_err()); assert!(identity.is_device_signed(&first).is_err());