Piotr Jurkiewicz
c8a0fc6aa2
Use OrderedDict from .compat module
2016-04-15 04:43:53 +02:00
Piotr Jurkiewicz
4f5741e1ff
Add test of headers order preservation
2016-04-15 00:35:57 +02:00
kennethreitz
4a716e0dfc
Merge pull request #2897 from BraulioVM/dummy-server
...
Test socket server
2016-04-11 16:29:02 -04:00
Braulio Valdivielso Martínez
634b2beb39
Fixed indenting issues
2016-04-11 20:03:23 +02:00
tzickel
219490ea7f
Make a dummy test
2016-04-08 23:17:37 +03:00
tzickel
2246a52a36
Added a test to show a faulty behaviour when posting binary data for an object
...
with no __iter__
2016-04-08 20:25:01 +03:00
kennethreitz
f0860bd3ca
Merge pull request #3048 from Stranger6667/test-structures
...
Added unit tests for structures module
2016-04-06 15:06:36 -04:00
kennethreitz
456be3cfde
Merge pull request #3024 from Stranger6667/utils-unit-tests
...
Added unit tests for utils module
2016-04-06 15:05:13 -04:00
kennethreitz
b6b1b3a81c
Merge pull request #3049 from Stranger6667/test-hooks
...
Added unit tests for hooks module
2016-04-06 15:04:15 -04:00
kennethreitz
03ed671a41
Merge pull request #3059 from alexanderad/proxy-connection-errors
...
Raise a ProxyError for proxy related connection issues
2016-04-06 15:01:25 -04:00
Ben
f24d56a1ce
Consolidate logic for changing method during redirects
...
I only moved the code into a function, there was no actual change to
the code. I added a few tests to ensure we're doing things correctly.
The real point of me doing this is to make it easier to bring back
`strict_mode` functionality. For you requests youngsters in the crowd,
`strict_mode` followed the spec for redirects meaning the method
wouldn't change to a GET. The current code follows the browser
convention of changing the method to a GET when doing a 302 redirect.
However, lots of servers want you to follow the standards (the nerve!)
so I'd like to override the logic. Now that the method changing logic
is in `rebuild_method`, I can simply override that function instead of
overriding the entire `resolve_redirects` function as suggested by
kennethreitz/requests#1325
2016-03-17 23:16:39 -05:00
Alexander Shchapov
6ca9d71bb5
Raise a ProxyError for proxy related connection issues.
2016-03-17 15:46:26 -04:00
Dmitry Dygalo
81dc9084b2
Added unit tests for structures module
2016-03-15 14:47:32 +01:00
Dmitry Dygalo
eddea4e914
Added unit tests for hooks module
2016-03-14 14:08:44 +01:00
Dmitry Dygalo
1eb153529a
Merge remote-tracking branch 'upstream/master' into utils-unit-tests
...
Conflicts:
tests/test_utils.py
2016-03-13 10:24:47 +01:00
Braulio Valdivielso Martínez
b473440cc1
Fix tests in python 3
2016-03-07 18:33:06 +01:00
Cory Benfield
6cc0b56d51
Switch to treat files without tell() as zero-length
2016-03-07 09:05:43 +00:00
Cory Benfield
e034dd1140
Allow for exceptions from tell()
2016-03-07 08:31:23 +00:00
Casey Davidson
f74a6707af
Verify that cookie can be properly accessed if domain is specified, and that error is raised otherwise. Refs #3028 .
2016-03-05 20:37:56 -08:00
Casey Davidson
c53a685e7d
Fix typo.
2016-03-05 20:30:36 -08:00
Braulio Valdivielso Martínez
03743b15ed
Added docstrings to tests in test_testserver.py
2016-03-05 23:50:11 +01:00
Braulio Valdivielso Martínez
0dff06a7b9
Add blank line in test_requests.py
2016-03-05 23:28:32 +01:00
Braulio Valdivielso Martínez
c4abb4c9fb
Remove unwanted changes in test_utils.py
2016-03-05 23:26:36 +01:00
Braulio Valdivielso Martínez
94d4818fde
Remove unwanted change in test_requests.py
2016-03-05 23:22:52 +01:00
Braulio Valdivielso Martínez
eeafdc143b
Move test_chunked_upload to test_lowlevel.py
2016-03-05 23:21:00 +01:00
Braulio Valdivielso Martínez
66c52c3ce0
Leave two lines of separation between top level definitions
2016-03-05 23:11:31 +01:00
Braulio Valdivielso Martínez
3c3bde5381
Remove unwanted changes
2016-03-05 23:10:13 +01:00
Braulio Valdivielso Martínez
4edf1ae55f
Compare response bodies with unicode strings
2016-03-05 23:05:36 +01:00
Braulio Valdivielso Martínez
7088c06d8d
Changed tests to use socket.sendall instead of socket.send
2016-03-05 22:45:26 +01:00
Casey Davidson
b9517a58bc
Assert that both cookies were added in test. Refs #3028 .
2016-03-04 15:59:13 -08:00
Casey Davidson
1185d65202
Add tests to specify when CookieConflicError should be raised. References #3028 .
2016-03-04 15:55:43 -08:00
Braulio Valdivielso Martínez
44161ac373
Moved TestTestServer to its own file
2016-03-04 19:35:46 +01:00
Braulio Valdivielso Martínez
0d1a779030
Fixed style issues
2016-03-04 19:33:58 +01:00
Braulio Valdivielso Martínez
bf026e3c31
Removed unittest execution chunk
2016-03-04 19:24:15 +01:00
Braulio Valdivielso Martínez
e3ad31f3be
Added test_chunked_upload to test_requests.py
2016-03-04 19:21:32 +01:00
Braulio Valdivielso Martínez
f17ef753d2
Moved test_chunked_upload to test_requests.py
2016-03-03 22:13:47 +01:00
Braulio Valdivielso Martínez
567b31080e
Fixed formatting error in python2.6
2016-03-03 22:00:27 +01:00
Braulio Valdivielso Martínez
75a9a981b5
Removed unnecessary files
2016-03-03 22:00:08 +01:00
Braulio Valdivielso Martínez
ca35c847a2
Moved testserver to tests/
2016-03-03 21:52:59 +01:00
Braulio Valdivielso Martínez
141db281d1
Merged master
2016-03-03 21:44:21 +01:00
Dmitry Dygalo
f123f89d32
Added unit tests for utils module
2016-02-19 10:32:23 +01:00
kennethreitz
bbadf47a8f
syntax changes
2016-02-05 15:53:59 -05:00
Dmitry Dygalo
18b26d20f7
Added tests module.
2016-02-05 13:21:57 +01:00
Kenneth Reitz
e4c4c80b82
remove all old tests
2012-12-17 07:27:25 -05:00
Kenneth Reitz
58c10edb07
Merge pull request #1006 from passy/test-py3k-fix
...
Use range in favor of xrange for py3k test compatibility
2012-12-15 02:22:25 -08:00
Kenneth Reitz
4a9f3572a3
logging handlers
...
Closes #971
2012-12-14 23:51:53 -05:00
Kenneth Reitz
79992579c9
remove danger_mode tests
2012-12-14 23:27:38 -05:00
Kenneth Reitz
67c7e496f5
remove safe_mode tests
2012-12-14 23:26:48 -05:00
Pascal Hartig
a98ec717f2
Use range in favor of xrange for py3k compatibility
...
request_count is 2 so it really makes no difference performance-wise at all.
2012-12-14 23:29:33 +01:00
László Vaskó
e8d20926d3
Added testcases for keep-alive handling
...
* Added a dummy_server module to check connection count
* Added testcases for proxy and direct connections
2012-12-02 01:06:52 +01:00