ambv / requests-testadapter Goto Github PK
View Code? Open in Web Editor NEWAn adapter for unit testing with requests
An adapter for unit testing with requests
Hi ambv,
I just noticed that requests_testadapter doesn't actually have a license (which effectively means I can't use it). Can you add one, please? :)
Seems like you are well aware of this issue ;) https://github.com/kennethreitz/requests/issues/1395#issuecomment-18678815
$ python2.7 test/test_testadapter.py E. ====================================================================== ERROR: testBasic (__main__.TestRequestsTestAdapter) ---------------------------------------------------------------------- Traceback (most recent call last): File "test/test_testadapter.py", line 47, in testBasic r = s.get('http://testbasic.com/') File "/usr/local/lib/python2.7/dist-packages/requests/sessions.py", line 347, in get return self.request('GET', url, **kwargs) File "/usr/local/lib/python2.7/dist-packages/requests/sessions.py", line 335, in request resp = self.send(prep, **send_kwargs) File "/usr/local/lib/python2.7/dist-packages/requests/sessions.py", line 438, in send r = adapter.send(request, **kwargs) File "/usr/local/lib/python2.7/dist-packages/requests_testadapter.py", line 89, in send r.content File "/usr/local/lib/python2.7/dist-packages/requests/models.py", line 594, in content self._content = bytes().join(self.iter_content(CONTENT_CHUNK_SIZE)) or bytes() File "/usr/local/lib/python2.7/dist-packages/requests/models.py", line 541, in generate chunk = self.raw.read(chunk_size, decode_content=True) TypeError: read() got an unexpected keyword argument 'decode_content' ---------------------------------------------------------------------- Ran 2 tests in 0.008s
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.