diff --git a/tests/test_cookie_helpers.py b/tests/test_cookie_helpers.py index 767e1eaa34a..fead869d6f3 100644 --- a/tests/test_cookie_helpers.py +++ b/tests/test_cookie_helpers.py @@ -1095,13 +1095,13 @@ def test_parse_set_cookie_headers_date_formats_with_attributes() -> None: @pytest.mark.parametrize( ("header", "expected_name", "expected_value", "expected_coded"), [ - # Test cookie values with octal escape sequences - (r'name="\012newline\012"', "name", "\nnewline\n", r'"\012newline\012"'), + # Test cookie values with octal escape sequences (printable chars only) + (r'name="\050parens\051"', "name", "(parens)", r'"\050parens\051"'), ( - r'tab="\011separated\011values"', - "tab", - "\tseparated\tvalues", - r'"\011separated\011values"', + r'punct="\053plus\053values"', + "punct", + "+plus+values", + r'"\053plus\053values"', ), ( r'mixed="hello\040world\041"', @@ -1110,10 +1110,10 @@ def test_parse_set_cookie_headers_date_formats_with_attributes() -> None: r'"hello\040world\041"', ), ( - r'complex="\042quoted\042 text with \012 newline"', + r'complex="\042quoted\042 text with \055 hyphen"', "complex", - '"quoted" text with \n newline', - r'"\042quoted\042 text with \012 newline"', + '"quoted" text with - hyphen', + r'"\042quoted\042 text with \055 hyphen"', ), ], )