Skip to content

Commit

Permalink
Merge branch 'gh_663' into 'quote_1005'
Browse files Browse the repository at this point in the history
change default encoding of API calls to 'utf-8' #663

See merge request gh/peeringdb/peeringdb!81
  • Loading branch information
grizz committed Jun 23, 2020
2 parents 16ab849 + f77535d commit 8e687a5
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 1 addition & 1 deletion peeringdb_server/renderers.py
Expand Up @@ -32,7 +32,7 @@ def default(self, obj):
class MungeRenderer(renderers.BaseRenderer):
media_type = "text/plain"
format = "txt"
charset = "iso-8859-1"
charset = "utf-8"

def render(self, data, media_type=None, renderer_context=None):
# TODO use munge:
Expand Down
3 changes: 3 additions & 0 deletions tests/test_api.py
Expand Up @@ -107,6 +107,9 @@ def _request(self, typ, id=0, method="GET", params=None, data=None, url=None):
if params:
data.update(**params)
res = fnc(url, data, format="json")

assert res.charset == "utf-8"

return DummyResponse(res.status_code, res.content)


Expand Down

0 comments on commit 8e687a5

Please sign in to comment.