Skip to content

Commit

Permalink
Bump dependencies for Python 3.6, patch elastic_panel to fix str/byte…
Browse files Browse the repository at this point in the history
…s issue
  • Loading branch information
brutasse committed Mar 17, 2017
1 parent a9668e3 commit 7f84dad
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 2 deletions.
2 changes: 1 addition & 1 deletion requirements.in
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
bleach==1.5.0
defusedxml==0.4.1
defusedxml==0.5.0
dj-database-url==0.4.2
Django==1.10.5
django-floppyforms==1.7.0
Expand Down
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ appdirs==1.4.3 # via setuptools
bleach==1.5.0
click==6.7 # via rq
contextlib2==0.5.4 # via raven
defusedxml==0.4.1
defusedxml==0.5.0
dj-database-url==0.4.2
django-classy-tags==0.8.0 # via django-sekizai
django-floppyforms==1.7.0
Expand Down
10 changes: 10 additions & 0 deletions tests/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

from django.test import TestCase as BaseTestCase
from django_webtest import WebTest as BaseWebTest
from elastic_panel import panel
from feedhq import es
from feedhq.utils import get_redis_connection
from rache import job_key
Expand All @@ -12,6 +13,15 @@

TEST_DATA = os.path.join(os.path.abspath(os.path.dirname(__file__)), 'data')

_old_pretty_json = panel._pretty_json

def _pretty_json(data):
pretty = _old_pretty_json(data)
if isinstance(data, str):
data = data.encode()
return data
panel._pretty_json = _pretty_json


class BytesIO(BaseBytesIO):
def read(self, *args, **kwargs):
Expand Down

0 comments on commit 7f84dad

Please sign in to comment.