From 14226c07780f87df42a9b0f5cf6ab816d08ba5af Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Damir=20Jeli=C4=87?= Date: Tue, 8 Sep 2020 16:17:17 +0200 Subject: [PATCH] crypto: Refactor some tests. --- matrix_sdk_crypto/src/identities/user.rs | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/matrix_sdk_crypto/src/identities/user.rs b/matrix_sdk_crypto/src/identities/user.rs index 1d585e0f..f50e02cd 100644 --- a/matrix_sdk_crypto/src/identities/user.rs +++ b/matrix_sdk_crypto/src/identities/user.rs @@ -870,19 +870,13 @@ pub(crate) mod test { #[test] fn other_identity_create() { - let user_id = user_id!("@example2:localhost"); - 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(); + get_other_identity(); } #[test] fn own_identity_check_signatures() { let response = own_key_query(); - let identity = own_identity(&response); + let identity = get_own_identity(); let (first, second) = device(&response); assert!(identity.is_device_signed(&first).is_err());