Skip to content

Commit

Permalink
Fix tests under mitmproxy >= 2
Browse files Browse the repository at this point in the history
Apparently they fixed this ISO-8859-1 thing, but I don't want to bump my
requirements to mitmproxy >= 2 yet, so just get rid of this check.
  • Loading branch information
vfaronov committed Mar 4, 2017
1 parent 7fca3d9 commit 0fb26d6
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions test_fake_mitmdump.py
Original file line number Diff line number Diff line change
Expand Up @@ -90,10 +90,7 @@ def test_complex(bench): # pylint: disable=redefined-outer-name
content=b'{foo: "bar"}',
),
tutils.tresp(
http_version='HTTP/1.1', status_code=201,
# Not sure why mitmproxy wants me to encode this as UTF-8
# rather than ISO-8859-1, but so long as it works...
reason=u'Très bien'.encode('utf-8'),
http_version='HTTP/1.1', status_code=201, reason=u'Created',
headers=Headers([(b'Content-Type', b'text/plain'),
(b'Content-Length', b'14'),
(b'Date', b'Tue, 03 May 2016 14:13:34 GMT')]),
Expand Down Expand Up @@ -121,7 +118,7 @@ def test_complex(bench): # pylint: disable=redefined-outer-name
assert bench.report == (
b'------------ request: POST /foo-bar?baz=qux\n'
b'E 1038 Bad JSON body\n' +
u'------------ response: 201 Très bien\n'.encode('utf-8') +
b'------------ response: 201 Created\n' +
b'C 1073 Possibly missing Location header\n'
b'------------ request: GET /\n'
b'------------ response: 304 Not Modified\n'
Expand Down

0 comments on commit 0fb26d6

Please sign in to comment.