diff options
| author | Gael Pasgrimaud <gael@gawel.org> | 2016-12-16 12:00:25 +0100 |
|---|---|---|
| committer | Gael Pasgrimaud <gael@gawel.org> | 2016-12-16 12:00:25 +0100 |
| commit | 104148be4951c18872935872f82d7481ddc5b1f7 (patch) | |
| tree | c1f27cb7c0fd0f0b859039a818c6b91be9398d51 /docs | |
| parent | f693d4cefe6cae05238a5042f0a9ccad1a354b94 (diff) | |
| download | webtest-104148be4951c18872935872f82d7481ddc5b1f7.tar.gz | |
fix fixtures; webob1.7rc require bytes
Diffstat (limited to 'docs')
| -rw-r--r-- | docs/testapp_fixt.py | 4 | ||||
| -rw-r--r-- | docs/testresponse_fixt.py | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/docs/testapp_fixt.py b/docs/testapp_fixt.py index 23742cf..ecbbeb8 100644 --- a/docs/testapp_fixt.py +++ b/docs/testapp_fixt.py @@ -20,10 +20,10 @@ def application(environ, start_response): body = six.b('<xml><message>hey!</message></xml>') elif req.path_info.endswith('.json'): content_type = 'application/json' - body = json.dumps({"a": 1, "b": 2}) + body = six.b(json.dumps({"a": 1, "b": 2})) elif '/resource/' in req.path_info: content_type = 'application/json' - body = json.dumps(dict(id=1, value='value')) + body = six.b(json.dumps(dict(id=1, value='value'))) resp = Response(body, content_type=content_type) return resp(environ, start_response) diff --git a/docs/testresponse_fixt.py b/docs/testresponse_fixt.py index 66c373e..b80503e 100644 --- a/docs/testresponse_fixt.py +++ b/docs/testresponse_fixt.py @@ -20,7 +20,7 @@ def application(environ, start_response): body = six.b('<xml><message>hey!</message></xml>') elif req.path_info.endswith('.json'): content_type = 'application/json' - body = json.dumps({"a": 1, "b": 2}) + body = six.b(json.dumps({"a": 1, "b": 2})) resp = Response(body, content_type=content_type) return resp(environ, start_response) |
