Jakub Roztocil
dee3693ea0
Use BytesIO for bytes.
...
This fixes a TypeError on Python 3 that ocurred when passing
bytes as the values for files.
2012-08-10 19:49:03 +02:00
Jakub Roztocil
cfa627ae62
Fixed encoding of fields with the same name.
...
* Properly handle repeated data fields for multipart/form-data requests (#737 )
* Allow a list of 2-tuples as the `files` agument.
* Consistently serialize lists a of parameters (#729 ).
2012-08-10 19:49:03 +02:00
Radomir Stevanovic
4da4792844
tests: python2.6 compat (assertIn added in 2.7)
2012-08-10 17:51:01 +02:00
Kenneth Reitz
a65e8b4a22
Merge pull request #767 from stefanp/develop
...
Wrap socket.error in ConnectionError (+ unit tests)
2012-08-08 13:23:10 -07:00
Stefan Praszalowicz
875c9e18ab
Wrap socket.error in ConnectionError (+ unit tests)
2012-08-08 11:12:32 -07:00
Cory Benfield
e624ae8aea
Add test for Issue #423 .
2012-08-08 13:33:25 +01:00
Shivaram Lingamneni
291859c199
fix the tests for python 3
2012-08-06 16:11:45 -07:00
Shivaram Lingamneni
857d8eda3a
red tests derived from @dhagrow's examples in #760
2012-08-06 15:53:48 -07:00
Kenneth Reitz
b13c24d7b9
Merge pull request #760 from slingamn/fix_leak.release
...
address connection leak issue from #520
2012-08-05 21:38:12 -07:00
Shivaram Lingamneni
3c0b94047c
address connection leak issue from #520
...
* prefetch now defaults to True, ensuring that by default, sockets
are returned to the urllib3 connection pool on request end
* sessions now have a close() method, notifying urllib3 to close pooled
connections
* the module-level API, e.g., `requests.get('http://www.google.com ')`,
explicitly closes its session when finished
When prefetch is False, the open socket becomes part of the state of the
Response object, and it's the client's responsibility to read the whole
body, at which point the socket will be returned to the pool.
2012-08-05 21:09:13 -07:00
Marcus McCurdy
493ea93469
Fixed issue #747
...
Bound the name builtin_str to __builtin__.str and added another check
for this class since the str class was rebound to unicode in compat.
This issue was only for Python 2 as well.
2012-08-03 23:13:17 -04:00
Marcus McCurdy
12328d6e58
Added a test to expose issue #747
2012-08-03 20:09:56 -04:00
Cory Benfield
02dcc40acd
Failing test for Issue #737 .
2012-07-27 09:49:39 +01:00
Kenneth Reitz
82d343fa00
disable tricky tests
2012-07-27 02:18:31 -04:00
Matthias Rahlf
08cebb3c2f
fixed param handling in Request.full_url
2012-07-10 01:06:02 +02:00
Cory Benfield
f8076fee5e
Temporary fix for unicode literal breaking test.
2012-06-19 18:36:35 +01:00
Piotr Dobrogost
8d75cdf7fe
Fixes issue #669
...
NamedTemporaryFile was being automatically deleted on Windows thus
couldn't be opened later for reading
2012-06-10 15:27:54 +02:00
Kenneth Reitz
10d2398173
fix test for python3
2012-06-07 22:21:06 -04:00
Kenneth Reitz
78eecd7d7e
Merge pull request #659 from Bluehorn/develop
...
Allow passing a file or file-like object as data.
2012-06-07 19:06:49 -07:00
Kenneth Reitz
e8f3fc33bb
test that empty body text responses work
2012-06-07 21:54:45 -04:00
Torsten Landschoff
f0e327f979
Allow passing a file or file-like object as data.
...
The underlying httplib already allows passing an open file object as body
to its HTTPConnection.request method. I think requests should allow that
as well.
2012-06-07 10:13:40 +02:00
Arup Malakar
4a30979622
Change the None check from self.assertIsNone to python style None Check, as build was failing
2012-05-23 14:25:54 -07:00
Arup Malakar
b28673368b
Issue #505 : Changed the store_cookie configuration to be part of the config dict, instead of being a new argument
2012-05-23 14:12:18 -07:00
Josh Imhoff
96cd8e9ca0
Wrote tests for new CookieJar functionality and made them pass.
2012-05-21 20:14:12 -04:00
Kenneth Reitz
3c14435109
fix test for 2.6's unittest
2012-05-16 17:13:55 -07:00
Kenneth Reitz
4cf31b0b86
authors
2012-05-16 17:09:43 -07:00
Arup Malakar
c501784541
Issue #505 : Allow disabling of cookie persistence/sending
2012-05-16 15:07:15 -07:00
Kenneth Reitz
07f6675376
remove requests async tests
2012-05-10 17:02:22 -05:00
Roman Haritonov
975430d5e6
Test async requests with Session cookies
2012-05-08 12:55:36 +04:00
Roman Haritonov
56ef079e6f
Test if cookies are saving to session when session.request is called with return_response=False
2012-05-08 12:17:58 +04:00
barberj
b066902705
adding test verifying data httpbin sees
2012-05-06 19:24:37 -04:00
barberj
64eb415ec0
synatx error for python3. all strings are unicode
2012-05-06 18:50:42 -04:00
barberj
3288426f2b
added unicode strings
2012-05-06 15:14:57 -07:00
barberj
ed7b14899f
added mutlipart file=strings
2012-05-06 15:14:40 -07:00
Shivaram Lingamneni
8fedec785a
Tests for persistent and secure cookies
2012-05-03 23:20:37 -07:00
Shivaram Lingamneni
3d4d5ab0df
test for #458
2012-05-03 21:16:46 -07:00
Kenneth Reitz
317f64a11f
Merge pull request #577 from slingamn/redirects_537
...
Fix and test for #537
2012-05-03 01:36:12 -07:00
Shivaram Lingamneni
41d1a427b0
add a test for max_redirects in safe/normal modes
2012-05-03 01:29:12 -07:00
Shivaram Lingamneni
a8555d811d
remove fancy test assertions that are unavailable on 2.6
2012-05-02 20:21:02 -07:00
Shivaram Lingamneni
11a3eaec26
add Python 3 compatibility
2012-05-01 17:00:19 -07:00
Shivaram Lingamneni
7832f2ae7e
add laurentb's test case for cookie handling on redirects
2012-05-01 17:00:19 -07:00
Shivaram Lingamneni
6eb349f5d2
remove unused import in test
2012-05-01 17:00:19 -07:00
Shivaram Lingamneni
ff169d32fe
fix and test for a bug dhagrow reported
2012-05-01 17:00:19 -07:00
Shivaram Lingamneni
492bda1343
add a test for redirection
2012-05-01 17:00:19 -07:00
Shivaram Lingamneni
4d6871d917
Further changes to move cookies to CookieJar
2012-05-01 17:00:19 -07:00
Kenneth Reitz
742cbeaee1
httpbin weirdness
2012-05-01 05:51:59 -04:00
Kenneth Reitz
2621fe2bff
Revert "Add failing tests for invalid %encodings"
...
This reverts commit e28c1c9bfa .
2012-04-22 22:26:07 -04:00
Kenneth Reitz
3843a40f7c
Revert "Reenable test_session_with_escaped_url test"
...
This reverts commit 3550ac7473 .
2012-04-22 22:25:57 -04:00
Shivaram Lingamneni
1360e77cb2
Add a smoke test for https functionality
2012-04-16 17:50:40 -07:00
Roman Haritonov
d569a2d6bc
fix #549 Add 'prefetch' to Session.__attrs__ and Requests.__init__
2012-04-13 19:25:10 +04:00