Spaces:
Running
Running
Download backend/tests/test_chat.py from HeshamXOR/MalwareGuard: direct link, hf CLI and curl.
- Browser
- Download file 353 Bytes
-
https://huggingface.co/spaces/HeshamXOR/MalwareGuard/resolve/main/backend/tests/test_chat.py
- Command line
-
hf download hf://spaces/HeshamXOR/MalwareGuard/backend/tests/test_chat.py
-
curl -L -o test_chat.py https://huggingface.co/spaces/HeshamXOR/MalwareGuard/resolve/main/backend/tests/test_chat.py
353 Bytes
| def test_chat_uses_fallback_when_gemini_unavailable(client): | |
| response = client.post( | |
| "/api/chat/", | |
| json={"message": "How does malware detection work?"}, | |
| ) | |
| assert response.status_code == 200 | |
| body = response.json() | |
| assert body["success"] is True | |
| assert "MalwareGuard analyzes Windows PE files" in body["response"] | |