diff --git a/.travis.yml b/.travis.yml new file mode 100644 index 0000000..cb398c5 --- /dev/null +++ b/.travis.yml @@ -0,0 +1,13 @@ +language: python + +sudo: false +env: + - TOXENV=py27 + - TOXENV=py34 + - TOXENV=pypy + +install: + - travis_retry pip install tox + +script: + - tox diff --git a/README.md b/README.md index 833d8b1..457188d 100644 --- a/README.md +++ b/README.md @@ -3,6 +3,8 @@ httpbin(1): HTTP Request & Response Service Freely hosted in [HTTP](http://httpbin.org), [HTTPS](https://httpbin.org) & [EU](http://eu.httpbin.org/) flavors by [Runscope](https://www.runscope.com/) +[![Build +Status](https://travis-ci.org/Runscope/httpbin.svg)](https://travis-ci.org/Runscope/httpbin) [![Deploy to Heroku](https://camo.githubusercontent.com/c0824806f5221ebb7d25e559568582dd39dd1170/68747470733a2f2f7777772e6865726f6b7563646e2e636f6d2f6465706c6f792f627574746f6e2e706e67)](https://heroku.com/deploy?template=https://github.com/Runscope/httpbin) diff --git a/test_httpbin.py b/test_httpbin.py index 43b6135..6f8b9f2 100755 --- a/test_httpbin.py +++ b/test_httpbin.py @@ -68,8 +68,9 @@ class HttpbinTestCase(unittest.TestCase): self.assertEqual(response.status_code, 200) def test_post_body_binary(self): - with open('httpbin/core.pyc', 'rb') as f: - response = self.app.post('/post', data={"file": f.read()}) + response = self.app.post( + '/post', + data={"file": b'\x01\x02\x03\x81\x82\x83'}) self.assertEqual(response.status_code, 200) def test_post_body_unicode(self):