Crate hyper_mock_client
source · [−]Expand description
hyper-mock-client
hyper-mock-client
is a hyper::client mock to test tower::services such as axum::router
Example
mod tests {
use hyper::{Request,Body, StatusCode};
use axum::{Router};
use hyper_mock_client::MockClient;
let app = super::MakeApiApp();
let mut client = MockClient::new(app);
let resp = client.get("/status").await;
Structs
The mock client, instantiate with
new