Skip to content

Commit

Permalink
Remove content type injection (#23)
Browse files Browse the repository at this point in the history
* remove content-type injection

* gitignore
  • Loading branch information
jonny-onna authored Dec 17, 2018
1 parent 5e57d39 commit b5f6af5
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 7 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
**/__pycache__/
**/.mypy_cache
**/cassettes
/.idea/
*.pyc
*~
5 changes: 5 additions & 0 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
Changelog
=========

2.0.1
------

- remove content-type injection in stored data

2.0.0
-----

Expand Down
6 changes: 0 additions & 6 deletions cassettedeck/store.py
Original file line number Diff line number Diff line change
Expand Up @@ -174,12 +174,6 @@ def build_response(self, method, url, params, data, headers):
resp.status = resp_json['status']['code']
resp.reason = resp_json['status']['message']

# Set default plain/text if no Content-Type
try:
resp_json['headers']['Content-Type']
except KeyError:
resp_json['headers']['Content-Type'] = 'plain/text'

# Set headers and content
resp._headers = CIMultiDict(resp_json['headers'])
resp.content = StreamReader(Mock())
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

setup(
name='cassettedeck',
version='2.0.0',
version='2.0.1',
description='A library store and replay aiohttp requests',
long_description='To simplify and speed up tests that make HTTP requests',
author='Developer team at Onna Technologies',
Expand Down

0 comments on commit b5f6af5

Please sign in to comment.