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

Function test_dlp_blocks_email

src/app/tests.rs:318–331  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

316
317#[tokio::test]
318async fn test_dlp_blocks_email() {
319 let mock_server = MockServer::start().await;
320 let app = make_app(&mock_server.uri());
321 let body = r#"{"messages":[{"role":"user","content":"Email me at user@example.com"}]}"#;
322 let req = Request::builder()
323 .method("POST")
324 .uri("/v1/chat/completions")
325 .header("authorization", "Bearer vk-test-1")
326 .header("content-type", "application/json")
327 .body(Body::from(body))
328 .unwrap();
329 let resp = app.oneshot(req).await.unwrap();
330 assert_eq!(resp.status(), StatusCode::BAD_REQUEST);
331}
332
333#[tokio::test]
334async fn test_dlp_blocks_credit_card() {

Callers

nothing calls this directly

Calls 1

make_appFunction · 0.85

Tested by

no test coverage detected