improvements

This commit is contained in:
2018-10-19 04:16:19 -07:00
parent 212f280c19
commit d4f83c978c
2 changed files with 9 additions and 2 deletions
-1
View File
@@ -143,7 +143,6 @@ class Request:
cookies = RequestsCookieJar()
cookie_header = self.headers.get("cookie", "")
# if cookie_header:
bc = SimpleCookie(cookie_header)
for k, v in bc.items():
cookies[k] = v
+9 -1
View File
@@ -396,4 +396,12 @@ def test_sessions(api, session):
r = session.get(api.url_for(view))
assert r.cookies['Responder-Session'] == '{"hello": "world"}.lJVWJULPqR9kdao_oT4pUglV281bxHfGvcKQ7XF8qNqaiIZlRcMvqKNdA1-d5z7DycAx5eqmzJZoqWPP759-Cw'
assert r.json() == {"hello": "world"}
assert r.json() == {"hello": "world"}
def test_template_rendering(api, session):
@api.route('/')
def view(req, resp):
resp.content = api.template_string("{{ var }}", var="hello")
r = session.get(api.url_for(view))
assert r.text == "hello"