mirror of
https://github.com/abhi1693/openclaw-mission-control.git
synced 2026-08-14 01:07:51 +00:00
Fix flake8 spacing for json_safe invalid-utf8 test
This commit is contained in:
@@ -219,13 +219,13 @@ def test_json_safe_handles_binary_inputs() -> None:
|
||||
assert _json_safe(memoryview(b"world")) == "world"
|
||||
|
||||
|
||||
|
||||
|
||||
def test_json_safe_replaces_invalid_utf8_bytes() -> None:
|
||||
# Invalid UTF-8 should be replaced with U+FFFD, not crash error handling.
|
||||
assert _json_safe(b"\xff") == "\ufffd"
|
||||
assert _json_safe(bytearray(b"\xff")) == "\ufffd"
|
||||
assert _json_safe(memoryview(b"\xff")) == "\ufffd"
|
||||
|
||||
|
||||
def test_json_safe_falls_back_to_string_for_unknown_objects() -> None:
|
||||
class Weird:
|
||||
def __str__(self) -> str:
|
||||
|
||||
Reference in New Issue
Block a user