Skip to content

Commit 972cdce

Browse files
committed
Added python 3.5 compatibility
1 parent 99d6f9d commit 972cdce

File tree

3 files changed

+11
-2
lines changed

3 files changed

+11
-2
lines changed

.travis.yml

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,13 @@ sudo: false
33
cache: false
44
python:
55
- '3.6'
6-
6+
addons:
7+
apt:
8+
sources:
9+
- deadsnakes
10+
packages:
11+
- python3.5
12+
- python3.5-dev
713
install:
814
- pip install -rrequirements-tests.txt
915

tests/test_views.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,9 @@
88

99

1010
def _format_response(response: Text = "") -> Union[List, Dict]:
11+
# python3.5 compatibility
12+
if isinstance(response, bytes):
13+
response = str(response, encoding="utf-8")
1114
return json.loads(response)
1215

1316

tox.ini

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
[tox]
2-
envlist = py36
2+
envlist = py36,py35
33

44
[testenv]
55
deps =

0 commit comments

Comments
 (0)