Skip to main content

Module testing

Module testing 

Source
Available on crate features testing only.
Expand description

Testing facilities and helpers for crypto tests

Re-exports§

pub use crate::identities::device::testing::get_device;
pub use crate::identities::user::testing::get_other_identity;
pub use crate::identities::user::testing::get_own_identity;
pub use crate::identities::user::testing::simulate_key_query_response_for_verification;
pub use crate::store::HISTORIC_ROOM_KEY_BUNDLES_BROADCASTER_CAPACITY;
pub use crate::store::IDENTITIES_BROADCASTER_CAPACITY;
pub use crate::store::ROOM_KEYS_RECEIVED_CAPACITY;
pub use crate::store::ROOM_KEYS_WITHHELD_RECEIVED_CAPACITY;
pub use crate::store::SECRETS_BROADCASTER_CAPACITY;

Functions§

get_device
Generate default DeviceData for tests
get_other_identity
Generate default other identify for tests
get_own_identity
Generate default own identity for tests
simulate_key_query_response_for_verification
When we want to test identities that are verified, we need to simulate the verification process. This function supports that by simulating what happens when a successful verification dance happens and providing the /keys/query response we would get when that happened.