MCPcopy Create free account
hub / github.com/AI45Lab/Code / test_web_fetch_invalid_url

Function test_web_fetch_invalid_url

core/src/tools/builtin/web_fetch.rs:201–212  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

199
200 #[tokio::test]
201 async fn test_web_fetch_invalid_url() {
202 let tool = WebFetchTool;
203 let ctx = ToolContext::new(std::path::PathBuf::from("/tmp"));
204
205 let result = tool
206 .execute(&serde_json::json!({"url": "not-a-url"}), &ctx)
207 .await
208 .unwrap();
209
210 assert!(!result.success);
211 assert!(result.content.contains("must start with"));
212 }
213
214 #[tokio::test]
215 async fn test_web_fetch_missing_url() {

Callers

nothing calls this directly

Calls 1

executeMethod · 0.45

Tested by

no test coverage detected