Skip to content

Commit 2a487b1

Browse files
committed
Add ci
1 parent e226e30 commit 2a487b1

File tree

4 files changed

+12
-3
lines changed

4 files changed

+12
-3
lines changed

.travis.yml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
language: python
2+
python:
3+
- "2.7"
4+
- "3.6"
5+
install:
6+
- pip install -Ur requirements.txt
7+
- pip install -Ur dev_requirements.txt
8+
script:
9+
- python -m pylint ./pusher_push_notifications/*.py
10+
- python -m nose -s

Makefile

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,4 +27,3 @@ test_python2: venv
2727

2828
lint: venv
2929
@venv/bin/python3 -m pylint ./pusher_push_notifications/*.py
30-

pusher_push_notifications/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,7 @@ def publish(self, interests, publish_body):
156156
response = session.send(request.prepare())
157157
try:
158158
response_body = response.json()
159-
except json.decoder.JSONDecodeError:
159+
except ValueError:
160160
response_body = {}
161161

162162
if response.status_code != 200:

tests/test_push_notifications.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ def test_publish_should_make_correct_http_request(self):
108108
'content-type': 'application/json',
109109
'content-length': '69',
110110
'authorization': 'Bearer SECRET_KEY',
111-
'x-pusher-library': 'pusher-push-notifications-python 0.9.0',
111+
'x-pusher-library': 'pusher-push-notifications-python 0.9.1',
112112
'host': 'instance_id.pushnotifications.pusher.com',
113113
},
114114
)

0 commit comments

Comments
 (0)