summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTheron Luhn <theron@luhn.com>2014-07-28 13:09:30 -0700
committerTheron Luhn <theron@luhn.com>2014-07-28 13:09:30 -0700
commit3cc472a6f3211a629dba876c22051a9a9bc5d0d4 (patch)
tree032f6af440e17231ebe9dc61d367bbc36d699941
parent0ee1f5fe6fc4d69e8804ced4c59206c4e351c2c6 (diff)
downloadwebtest-3cc472a6f3211a629dba876c22051a9a9bc5d0d4.tar.gz
Small fix to `TestApp.set_cookie`
-rw-r--r--webtest/compat.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/webtest/compat.py b/webtest/compat.py
index 45334b3..1c9714d 100644
--- a/webtest/compat.py
+++ b/webtest/compat.py
@@ -46,9 +46,9 @@ def escape_cookie_value(value):
Escapes a value so that it can be safely stored in a cookie.
"""
- return str(''.join(
+ return '"' + ''.join(
COOKIE_ESCAPE_CHAR_MAP.get(x, x) for x in value
- ))
+ ) + '"'
# A list of illegal characters in a cookie and the escaped equivalent.