Skip to content

Commit

Permalink
fix bytes/str bug in tests
Browse files Browse the repository at this point in the history
  • Loading branch information
hodbn committed Mar 17, 2020
1 parent 67cc648 commit e982e4c
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions tests/test_lowlevel.py
Expand Up @@ -34,8 +34,8 @@ def test_chunked_upload_uses_only_the_specified_host_header():
correct_host = 'sample-host'
def single_host_header_response_handler(sock):
request_content = consume_socket_content(sock, timeout=0.5)
assert 'Host: {}'.format(correct_host) in request_content
assert request_content.count('Host: ') == 1
assert b'Host: {}'.format(correct_host) in request_content
assert request_content.count(b'Host: ') == 1
sock.send(text_200)

return request_content
Expand All @@ -50,8 +50,6 @@ def single_host_header_response_handler(sock):
close_server.set() # release server block

assert r.status_code == 200
assert r.request.headers['Transfer-Encoding'] == 'chunked'
assert r.request.headers['Host'] == correct_host


def test_digestauth_401_count_reset_on_redirect():
Expand Down

0 comments on commit e982e4c

Please sign in to comment.