Skip to content

Commit 7fc6fe1

Browse files
Test extension strip-plus-sanitize key normalization
Co-authored-by: Shri Sukhani <shrisukhani@users.noreply.github.com>
1 parent 51790cd commit 7fc6fe1

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

tests/test_extension_utils.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -171,6 +171,14 @@ def test_parse_extension_list_response_data_missing_key_normalizes_control_chara
171171
parse_extension_list_response_data({"bad\tkey": "value"})
172172

173173

174+
def test_parse_extension_list_response_data_missing_key_strips_and_sanitizes_key_text():
175+
with pytest.raises(
176+
HyperbrowserError,
177+
match="Expected 'extensions' key in response but got \\[bad\\?key\\] keys",
178+
):
179+
parse_extension_list_response_data({" bad\tkey ": "value"})
180+
181+
174182
def test_parse_extension_list_response_data_missing_key_preserves_control_placeholders():
175183
with pytest.raises(
176184
HyperbrowserError,

0 commit comments

Comments
 (0)