@@ -50,16 +50,27 @@ def test_basic(self):
50
50
))
51
51
},
52
52
53
- {'data' : 'cookie="{"key": "value"}"' ,
54
- 'dict' : {'cookie' : '{"key": "value"}' },
55
- 'repr' : "<SimpleCookie: cookie='{\" key\" : \" value\" }'>" ,
56
- 'output' : 'Set-Cookie: cookie="{"key": "value"}"' ,
53
+ # gh-92936: allow double quote in cookie values
54
+ {
55
+ 'data' : 'cookie="{"key": "value"}"' ,
56
+ 'dict' : {'cookie' : '{"key": "value"}' },
57
+ 'repr' : "<SimpleCookie: cookie='{\" key\" : \" value\" }'>" ,
58
+ 'output' : 'Set-Cookie: cookie="{"key": "value"}"' ,
57
59
},
58
-
59
- {'data' : 'key="some value; surrounded by quotes"' ,
60
- 'dict' : {'key' : 'some value; surrounded by quotes' },
61
- 'repr' : "<SimpleCookie: key='some value; surrounded by quotes'>" ,
62
- 'output' : 'Set-Cookie: key="some value; surrounded by quotes"' ,
60
+ {
61
+ 'data' : 'key="some value; surrounded by quotes"' ,
62
+ 'dict' : {'key' : 'some value; surrounded by quotes' },
63
+ 'repr' : "<SimpleCookie: key='some value; surrounded by quotes'>" ,
64
+ 'output' : 'Set-Cookie: key="some value; surrounded by quotes"' ,
65
+ },
66
+ {
67
+ 'data' : 'session="user123"; preferences="{"theme": "dark"}"' ,
68
+ 'dict' : {'session' : 'user123' , 'preferences' : '{"theme": "dark"}' },
69
+ 'repr' : "<SimpleCookie: preferences='{\" theme\" : \" dark\" }' session='user123'>" ,
70
+ 'output' : '\n ' .join ((
71
+ 'Set-Cookie: preferences="{"theme": "dark"}"' ,
72
+ 'Set-Cookie: session="user123"' ,
73
+ ))
63
74
}
64
75
]
65
76
0 commit comments