()
| 316 | |
| 317 | #[tokio::test] |
| 318 | async 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] |
| 334 | async fn test_dlp_blocks_credit_card() { |
nothing calls this directly
no test coverage detected