little update
This commit is contained in:
10
tests/test_vm_api_errors.py
Normal file
10
tests/test_vm_api_errors.py
Normal file
@@ -0,0 +1,10 @@
|
||||
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>"
|
||||
)
|
||||
Reference in New Issue
Block a user