()
| 189 | |
| 190 | #[test] |
| 191 | fn mock_openai_chat_completion() { |
| 192 | let route = make_route("mock://test", &["openai_chat_completions"], "gpt-4"); |
| 193 | let resp = mock_response(&route, "openai_chat_completions"); |
| 194 | assert_eq!(resp.status, 200); |
| 195 | |
| 196 | let body: serde_json::Value = serde_json::from_slice(&resp.body).unwrap(); |
| 197 | assert_eq!(body["model"], "gpt-4"); |
| 198 | assert_eq!(body["object"], "chat.completion"); |
| 199 | assert_eq!( |
| 200 | body["choices"][0]["message"]["content"], |
| 201 | "Hello from openshell mock backend" |
| 202 | ); |
| 203 | } |
| 204 | |
| 205 | #[test] |
| 206 | fn mock_anthropic_messages() { |
nothing calls this directly
no test coverage detected