From 84a521a827fea1212e59c5eeb1a1ab95627713e3 Mon Sep 17 00:00:00 2001 From: Jakub Roztocil Date: Sat, 26 Apr 2014 18:23:13 +0200 Subject: [PATCH] Added test_unicode_url_query_arg_item. --- tests/test_unicode.py | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/tests/test_unicode.py b/tests/test_unicode.py index 283b432a..4d09bd52 100644 --- a/tests/test_unicode.py +++ b/tests/test_unicode.py @@ -3,7 +3,7 @@ Various unicode handling related tests. """ -from tests import http, httpbin +from tests import http, httpbin, HTTP_OK UNICODE = u'太陽' @@ -13,22 +13,32 @@ class TestUnicode: def test_unicode_headers(self): r = http('GET', httpbin('/headers'), u'Test:%s' % UNICODE) + assert HTTP_OK in r assert r.json['headers']['Test'] == UNICODE def test_unicode_form_item(self): r = http('--form', 'POST', httpbin('/post'), u'test=%s' % UNICODE) + assert HTTP_OK in r assert r.json['form']['test'] == UNICODE def test_unicode_json_item(self): r = http('--json', 'POST', httpbin('/post'), u'test=%s' % UNICODE) + assert HTTP_OK in r assert r.json['json']['test'] == UNICODE def test_unicode_raw_json_item(self): r = http('--json', 'POST', httpbin('/post'), u'test:=["%s"]' % UNICODE) + assert HTTP_OK in r assert r.json['json']['test'] == [UNICODE] + def test_unicode_url_query_arg_item(self): + r = http(httpbin('/get'), u'test==%s' % UNICODE) + assert HTTP_OK in r + assert r.json['args']['test'] == UNICODE, r + def test_unicode_url(self): r = http(httpbin(u'/get?test=' + UNICODE)) + assert HTTP_OK in r assert r.json['args']['test'] == UNICODE def test_unicode_basic_auth(self):