We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 138d44a commit d3dbb23Copy full SHA for d3dbb23
1 file changed
tests/test_extension_utils.py
@@ -232,6 +232,21 @@ def __str__(self) -> str:
232
parse_extension_list_response_data({_ControlStringKey(): "value"})
233
234
235
+def test_parse_extension_list_response_data_missing_key_handles_strip_and_sanitize_stringified_keys():
236
+ class _MixedStringKey:
237
+ def __str__(self) -> str:
238
+ return " bad\tkey "
239
+
240
+ with pytest.raises(
241
+ HyperbrowserError,
242
+ match=(
243
+ "Expected 'extensions' key in response but got "
244
+ "\\[bad\\?key\\] keys"
245
+ ),
246
+ ):
247
+ parse_extension_list_response_data({_MixedStringKey(): "value"})
248
249
250
def test_parse_extension_list_response_data_missing_key_handles_string_subclass_str_results():
251
class _StringSubclassKey:
252
class _RenderedKey(str):
0 commit comments