forked from PeachCloud/peach-workspace
move jsonrpc test to dev deps for buttons
This commit is contained in:
parent
0249a191d1
commit
0f1ee3a36c
|
@ -35,6 +35,8 @@ gpio-cdev = "0.2"
|
|||
jsonrpc-core = "11"
|
||||
jsonrpc-ws-server = "11"
|
||||
jsonrpc-pubsub = "11"
|
||||
jsonrpc-test = "11"
|
||||
log = "0.4"
|
||||
snafu = "0.4"
|
||||
|
||||
[dev-dependencies]
|
||||
jsonrpc-test = "11"
|
||||
|
|
|
@ -7,8 +7,6 @@ use crossbeam_channel::bounded;
|
|||
use jsonrpc_core::futures::Future;
|
||||
use jsonrpc_core::*;
|
||||
use jsonrpc_pubsub::{PubSubHandler, Session, Subscriber, SubscriptionId};
|
||||
#[allow(unused_imports)]
|
||||
use jsonrpc_test as test;
|
||||
use jsonrpc_ws_server::{RequestContext, ServerBuilder};
|
||||
use log::{debug, error, info, warn};
|
||||
|
||||
|
@ -103,6 +101,7 @@ pub fn run() -> Result<(), BoxError> {
|
|||
#[cfg(test)]
|
||||
mod tests {
|
||||
use super::*;
|
||||
use jsonrpc_test as test_rpc;
|
||||
|
||||
#[test]
|
||||
fn rpc_success() {
|
||||
|
@ -111,7 +110,7 @@ mod tests {
|
|||
io.add_method("rpc_success_response", |_| {
|
||||
Ok(Value::String("success".into()))
|
||||
});
|
||||
test::Rpc::from(io)
|
||||
test_rpc::Rpc::from(io)
|
||||
};
|
||||
|
||||
assert_eq!(rpc.request("rpc_success_response", &()), r#""success""#);
|
||||
|
|
Loading…
Reference in New Issue