Cargo.toml: Use the tokio async test macro.
parent
aa1e69e98b
commit
bd53e18aa9
|
@ -35,7 +35,6 @@ cjson = { version = "0.1.0", optional = true }
|
||||||
tokio = { version = "0.2.13", default-features = false, features = ["sync"] }
|
tokio = { version = "0.2.13", default-features = false, features = ["sync"] }
|
||||||
|
|
||||||
[dev-dependencies]
|
[dev-dependencies]
|
||||||
tokio = { version = "0.2.13", features = ["full"] }
|
tokio = { version = "0.2.13", features = ["rt-threaded", "macros"] }
|
||||||
async-std = { version = "1.5.0", features = ["unstable", "attributes"] }
|
|
||||||
url = "2.1.1"
|
url = "2.1.1"
|
||||||
mockito = "0.23.3"
|
mockito = "0.23.3"
|
||||||
|
|
|
@ -414,7 +414,7 @@ mod test {
|
||||||
assert!(machine.should_upload_keys());
|
assert!(machine.should_upload_keys());
|
||||||
}
|
}
|
||||||
|
|
||||||
#[async_std::test]
|
#[tokio::test]
|
||||||
async fn receive_keys_upload_response() {
|
async fn receive_keys_upload_response() {
|
||||||
let mut machine = OlmMachine::new(&user_id(), DEVICE_ID);
|
let mut machine = OlmMachine::new(&user_id(), DEVICE_ID);
|
||||||
let mut response = keys_upload_response();
|
let mut response = keys_upload_response();
|
||||||
|
@ -443,7 +443,7 @@ mod test {
|
||||||
assert!(!machine.should_upload_keys());
|
assert!(!machine.should_upload_keys());
|
||||||
}
|
}
|
||||||
|
|
||||||
#[async_std::test]
|
#[tokio::test]
|
||||||
async fn generate_one_time_keys() {
|
async fn generate_one_time_keys() {
|
||||||
let mut machine = OlmMachine::new(&user_id(), DEVICE_ID);
|
let mut machine = OlmMachine::new(&user_id(), DEVICE_ID);
|
||||||
|
|
||||||
|
@ -516,7 +516,7 @@ mod test {
|
||||||
assert!(ret.is_ok());
|
assert!(ret.is_ok());
|
||||||
}
|
}
|
||||||
|
|
||||||
#[async_std::test]
|
#[tokio::test]
|
||||||
async fn test_keys_for_upload() {
|
async fn test_keys_for_upload() {
|
||||||
let mut machine = OlmMachine::new(&user_id(), DEVICE_ID);
|
let mut machine = OlmMachine::new(&user_id(), DEVICE_ID);
|
||||||
machine.uploaded_signed_key_count = Some(0);
|
machine.uploaded_signed_key_count = Some(0);
|
||||||
|
|
Loading…
Reference in New Issue