MCPcopy Create free account
hub / github.com/clawshell/clawshell / test_proxy_error_into_response_method_not_allowed

Function test_proxy_error_into_response_method_not_allowed

src/proxy.rs:365–372  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

363
364 #[tokio::test]
365 async fn test_proxy_error_into_response_method_not_allowed() {
366 let err = ProxyError::MethodNotAllowed("TRACE".to_string());
367 let resp = err.into_response();
368 assert_eq!(resp.status(), StatusCode::METHOD_NOT_ALLOWED);
369 let body = resp.into_body().collect().await.unwrap().to_bytes();
370 let json: serde_json::Value = serde_json::from_slice(&body).unwrap();
371 assert!(json["error"].as_str().unwrap().contains("TRACE"));
372 }
373
374 #[test]
375 fn test_filter_hop_by_hop_headers() {

Callers

nothing calls this directly

Calls 1

into_responseMethod · 0.80

Tested by

no test coverage detected