forked from extern/httpie-cli
More unicode.
This commit is contained in:
parent
0bd218eab0
commit
eca1ffaedb
@ -1,3 +1,4 @@
|
||||
# coding=utf-8
|
||||
"""Utilities used by HTTPie tests.
|
||||
|
||||
"""
|
||||
|
2
tests/fixtures/__init__.py
vendored
2
tests/fixtures/__init__.py
vendored
@ -32,3 +32,5 @@ with codecs.open(JSON_FILE_PATH, encoding='utf8') as f:
|
||||
|
||||
with open(BIN_FILE_PATH, 'rb') as f:
|
||||
BIN_FILE_CONTENT = f.read()
|
||||
|
||||
UNICODE = FILE_CONTENT
|
||||
|
2
tests/fixtures/test.json
vendored
2
tests/fixtures/test.json
vendored
@ -1,4 +1,4 @@
|
||||
{
|
||||
"name": "Jakub Roztočil",
|
||||
"sun": "太陽"
|
||||
"unicode": "χρυσαφὶ 太陽 เลิศ ♜♞♝♛♚♝♞♜ оживлённым तान्यहानि 有朋"
|
||||
}
|
||||
|
2
tests/fixtures/test.txt
vendored
2
tests/fixtures/test.txt
vendored
@ -1 +1 @@
|
||||
some UTF8-encoded unicode text 太陽 by Jakub Roztočil
|
||||
[one line of UTF8-encoded unicode text] χρυσαφὶ 太陽 เลิศ ♜♞♝♛♚♝♞♜ оживлённым तान्यहानि 有朋 ஸ்றீனிவாஸ ٱلرَّحْمـَبنِ
|
||||
|
@ -4,6 +4,7 @@ import shutil
|
||||
|
||||
from httpie.plugins.builtin import HTTPBasicAuth
|
||||
from tests import TestEnvironment, mk_config_dir, http, httpbin, HTTP_OK
|
||||
from tests.fixtures import UNICODE
|
||||
|
||||
|
||||
class SessionTestBase(object):
|
||||
@ -125,7 +126,6 @@ class TestSession(SessionTestBase):
|
||||
assert r2.json['headers']['Foo'] == 'Bar'
|
||||
|
||||
def test_session_unicode(self):
|
||||
UNICODE = u'太陽'
|
||||
r1 = http('--session=test', '--auth', u'test:' + UNICODE,
|
||||
'GET', httpbin('/get'),
|
||||
u'Test:%s' % UNICODE,
|
||||
|
@ -4,9 +4,7 @@ Various unicode handling related tests.
|
||||
|
||||
"""
|
||||
from tests import http, httpbin, HTTP_OK
|
||||
|
||||
|
||||
UNICODE = u'太陽'
|
||||
from tests.fixtures import UNICODE
|
||||
|
||||
|
||||
class TestUnicode:
|
||||
|
Loading…
Reference in New Issue
Block a user