Commit Graph

367 Commits

Author SHA1 Message Date
Cory Benfield e5053cd322 Define some httpbin fixtures. 2015-11-05 13:48:42 +00:00
Alex Khomchenko edc68a0ac8 fix issue #2844 2015-10-23 15:22:36 +03:00
Cory Benfield b071c49556 Failing test for issue #2818 2015-10-12 10:48:57 +01:00
Cory Benfield f6afa71281 Merge pull request #2763 from ravipra/json_supersedes
Fixed issue #2756
2015-10-05 15:27:53 +01:00
Cory Benfield 8963e1567b Merge pull request #2678 from sigmavirus24/proposed/2.8.0
Proposed 2.8.0
2015-10-05 15:09:41 +01:00
Ravi Prakash Putchala 1f48a4c9ea Removed the other 'encode' as well, in the test case. 2015-09-09 14:43:22 +05:30
Ravi Prakash Putchala 7a0cd16c1a changed the null check for 'data' parameter to be more explicit.
removed the superfluous encode from the testcase.
2015-09-09 13:04:24 +05:30
Ravi Prakash Putchala 37037607b5 Fixed issue #2756
Now 'json' parameter will be used to prepare body only if the 'data'
parameter is not present
2015-09-08 14:45:46 +05:30
Cory Benfield 56ecdebcc5 Merge pull request #2741 from jasongrout/per-host-proxy
Implement per-host proxies
2015-09-06 15:02:40 +12:00
Jason Grout fb496e4e86 Add test for per-host proxy selection 2015-08-27 18:21:04 +00:00
Ian Cordasco 66567e037b Fix tests on python 2.6 2015-08-24 20:47:22 -05:00
Cory Benfield 5d7392f140 Merge branch 'fix-merge-setting' of https://github.com/ak1r4/requests into proposed/2.8.0 2015-08-06 19:06:23 -04:00
Akira J 276202f51e Fix merge setting for not preserving original order of dict parameters 2015-08-04 22:47:12 +01:00
Ian Cordasco 873f834fc9 Merge remote-tracking branch 'upstream/master' into proposed/2.8.0 2015-07-18 10:57:34 -05:00
Ian Cordasco 31817b66c6 Fix pool connection closed test 2015-07-18 10:57:28 -05:00
Ian Cordasco b8a297baab Remove broken CaseInsensitiveDict repr test
Fixes #2668
2015-07-18 10:47:26 -05:00
Ian Cordasco 77d7e53c12 Merge branch 'auth-digest-multi-thread' of https://github.com/exvito/requests into proposed/2.8.0 2015-07-18 10:38:58 -05:00
Susan Tan 5ec7576f23 Catch and wrap ClosedPoolError
Partially resolves #1572: "urllib3 exceptions passing through requests
API".

Inspired from Lukasa's 2605be11d82d42438ac7c3993810c955bde74cef.
2015-07-17 01:30:51 -07:00
Gert Van Gool 3b325f1bc5 assert that the copy() is not the original 2015-07-14 08:10:13 +02:00
Gert Van Gool 47e71d1774 Don't test the NotImplemented, just make sure it's False 2015-07-13 15:07:38 +02:00
Gert Van Gool 147a305da8 Adds extra tests for CaseInsensitiveDict
- Test for NotImplemented in __eq__
- Adds test for copy()
- Adds test for __repr__()
2015-07-13 14:33:50 +02:00
colin fd31453aa2 fix unittest typo 2015-05-26 20:53:31 +01:00
colin 1da62a65d9 fix contextlib.closing bug for sessions where content is not consumed (issue #2593) 2015-05-24 15:01:34 -04:00
Ian Cordasco 35045e851a Simplify PreparedRequest.prepare API
Do not require that hooks be passed as an empty list to
PreparedRequest.prepare. In the event hooks is None in prepare or
prepare_hooks, use an empty list as a default.

Related to #2552
2015-04-20 20:13:58 -05:00
Pierre Tardy 142e24de7b digestauth: threadsafe test
Signed-off-by: Pierre Tardy <pierre.tardy@intel.com>
2015-04-03 16:32:39 +01:00
Priit Laes 62200cb07e Add testcase to demonstrate r.iter_lines() reentrancy issue 2015-03-07 12:00:37 +02:00
Ian Cordasco 39e49e5fb9 Merge pull request #2466 from sigmavirus24/bug/2465
Only add VendorAliases for vendored dependencies
2015-03-04 07:49:12 -06:00
Rasmus Scholer (TimelineX) 1887f32b17 test_can_send_bytes_bytearray_objects_with_files test now uses string input, not float. 2015-03-03 14:37:39 -05:00
Rasmus Scholer (TimelineX) 326f77d57c Created test case for using bytes and bytearray objects with files argument to Request. 2015-03-03 03:41:00 +01:00
Ian Cordasco 9d8a57f2a2 Add a test to ensure the alias does not regress 2015-02-28 20:19:13 -06:00
Colin Dickson 80aee7a225 add a timeout value to connection_error_invalid_port test to accelerate failure 2015-02-04 21:05:03 -05:00
Colin Dickson ced6550a25 split test_connection_error into two distinct tests, and changed "unknown url" test URL since fooobarbangbazbing.httpbin.org currently gives a valid response. 2015-02-03 21:23:07 -05:00
kennethreitz b137472936 Merge pull request #2393 from sigmavirus24/bug/2356
Attempt to quote anyway if unquoting fails
2015-01-27 10:24:34 -08:00
Ian Cordasco eec44dbbb1 Check that a filename is a basestring instance
Instead of only checking one or another type of string-like object that
we accept, let's be able to check both. Previously, we only checked if
the filename was an instance of the native str type which on Python 2
excluded unicode filenames and bytes-like filenames on Python 3.

Fixes #2411
2015-01-20 20:44:52 -06:00
Ian Cordasco 751b35c346 Attempt to quote anyway if unquoting fails
Fixes #2356
2015-01-18 21:07:43 -06:00
ContinuousFunction 4c61fef13f Uncommented test in test_requests.py
Uncommented test_sesion_pickling in test_requests.py and ran the file to
make sure the test passes.
2014-12-15 13:41:10 -05:00
ContinuousFunction 39090cfba6 Merge branch 'master' of https://github.com/kennethreitz/requests 2014-12-15 13:24:06 -05:00
Arthur Darcet e8d02ea0bb utils.guess_filename fails if the given parameter looks like a file object but has a non-string name attribute
e.g. a cherrypy uploaded file behave like a regular file, except that its name attribute is an int and passing it directly to requests fails because of that
2014-12-12 17:32:43 +01:00
Ian Cordasco cf82d4406b Update tests to work offline 2014-12-01 16:21:41 -06:00
ContinuousFunction 3246b1fe17 Changed ConnectionError to InvalidURL 2014-11-17 20:06:24 -08:00
ContinuousFunction 087a27aba9 Partially addresses Issue #1572
Addresses the LocationParseError but not the DecodeError from
kennethreitz#1572. When running
test_requests.py, I got an error in test_session_pickling which resulted
in a TypeError. I'm not sure of the reason for the TypeError but I have
commented out that test.
2014-11-15 16:58:25 -08:00
Ian Cordasco 2eb7e3c80b Add last few changes and add a quick test 2014-11-12 13:56:28 -06:00
Alexander Nelzin 34f6088c8f Added test for overriding Content-Length. 2014-11-12 15:23:23 +03:00
Ian Cordasco 29ef108158 Use to_native_string instead of builtin_str
Fixes #2316
2014-10-31 21:20:04 -05:00
Scott Sadler 583859b820 fix failing test "test_prepare_unicode_url" \(take 3\) 2014-10-26 14:45:12 +01:00
MinRK ca2ebc5b68 allow unicode URLs on Python 2
on Python 2 u'é'.decode('utf8') fails with UnicodeEncodeError,
but only AttributeError is caught.

This only calls decode on known bytes objects.
2014-10-05 16:30:11 -07:00
kennethreitz 1e79cf6a47 Merge pull request #2258 from willingc/add-json
Add json parameter
2014-10-05 12:46:09 -04:00
Joe Alcorn a68d1b4517 Support bytestring URLs on Python 3.x 2014-09-30 19:29:10 +01:00
Daniel Hahler bff8b91638 Document skipping in PreparedRequest; followup to #2222 2014-09-12 18:07:28 +02:00
Daniel Hahler d3566ee1b0 Add more tests to test_invalid_url
This adds tests for the behavior introduced in b149be5d, where
`PreparedRequest` was made to skip `parse_url` for e.g.
`localhost:3128/`.
2014-09-12 16:11:30 +02:00