Files
kernel/tests/test_vm_api_errors.py
2026-08-12 21:11:39 +03:00

11 lines
368 B
Python

from cloud.vm_manager import VMManager
def test_error_response_keeps_non_json_body() -> None:
payload = VMManager._decode_error_response(b"<html>upstream error</html>")
assert payload == {"raw_response": "<html>upstream error</html>"}
assert VMManager._error_message(payload, "Bad Gateway") == (
"Bad Gateway: <html>upstream error</html>"
)