Skip to content

Commit

Permalink
Update
Browse files Browse the repository at this point in the history
  • Loading branch information
sansyrox committed Aug 15, 2021
1 parent 7de60d8 commit df0940f
Showing 1 changed file with 17 additions and 17 deletions.
34 changes: 17 additions & 17 deletions src/router.rs
Original file line number Diff line number Diff line change
Expand Up @@ -71,20 +71,20 @@ impl Router {
}
}

#[cfg(test)]
mod router_test {
use super::*;
#[test]
fn test_no_route() {
let router = Router::new();
assert_eq!(router.get_route(Method::GET, "/").is_none(), true);
// let handler = Python::with_gil(|py| {
// let dict = pyo3::types::PyDict::new(py);
// assert!(dict.is_instance::<PyAny>().unwrap());
// let any: Py<PyAny> = dict.into_py(py);
// any
// });
// router.add_route("GET", "/", handler, false);
// assert_eq!(router.get_route(Method::GET, "/").is_some(), true);
}
}
// #[cfg(test)]
// mod router_test {
// use super::*;
// #[test]
// fn test_no_route() {
// let router = Router::new();
// assert_eq!(router.get_route(Method::GET, "/").is_none(), true);
// // let handler = Python::with_gil(|py| {
// // let dict = pyo3::types::PyDict::new(py);
// // assert!(dict.is_instance::<PyAny>().unwrap());
// // let any: Py<PyAny> = dict.into_py(py);
// // any
// // });
// // router.add_route("GET", "/", handler, false);
// // assert_eq!(router.get_route(Method::GET, "/").is_some(), true);
// }
// }

0 comments on commit df0940f

Please sign in to comment.