Skip to content
This repository has been archived by the owner on Nov 5, 2019. It is now read-only.

Avoid converting to bytes the Python 3 str header values #104

Closed
wants to merge 3 commits into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions tests/http_mock.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,14 @@ def request(self, uri,
self.uri = uri
self.method = method
self.body = body

# NB: reproduce the header normalization behavior
if headers is None:
headers = {}
else:
headers = httplib2._normalize_headers(headers)
self.headers = headers

return httplib2.Response(self.response_headers), self.data


Expand Down