11 lines
368 B
Python
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>"
|
|
)
|