Commit Graph

48 Commits

Author SHA1 Message Date
Darren Dormer 2255c34a65 Fix DNS resolution by using hostname instead of netloc and strip username and password when comparing against proxy bypass items. 2018-01-16 10:18:06 +01:00
dbairaktaris1 e0ab287317 added more to test scenarios 2018-01-04 10:59:47 -06:00
dbairaktaris1 cb0914407b Continue to refactor, remove list comprehension, add double quotes test case. 2018-01-04 10:30:50 -06:00
dbairaktaris1 071796d83f implement changes after code review 2018-01-03 23:40:08 -06:00
dbairaktaris1 1988d9cf72 Move nested function up to module level and rename. Add more tests for function. 2018-01-01 14:20:55 -06:00
Mingyuan Xia acd2645444 #4373, fix possible winreg value type difference (#4377)
* #4373, fix possible winreg value type difference

* add a test for ProxyOverride and ProxyEnable on win32

* add tests for winreg key ProxyEnable with two possible types

* fixing AppVeyor failures
2017-11-20 20:01:04 +00:00
Arthur Vigil c86b09b3c6 support extraction of certificate bundle from a zip archive 2017-11-05 12:14:17 -08:00
Remi Rampin 8e411d0f99 Add test case for empty Link: header 2017-08-17 12:56:45 -04:00
mlcrazy 1d7fd6c8b3 Fixes error swallowing in set_environ 2017-06-09 14:10:47 -04:00
kennethreitz 7f14db17c8 new requests namespace 2017-05-29 12:11:43 -04:00
schlamar 1c38e1f5f6 proxy bypass on Windows without DNS lookups 2017-05-04 10:44:47 +02:00
schlamar 4f34446b36 test proxy bypass with config from registry 2017-05-04 07:46:59 +02:00
John L. Villalovos 85400d8d67 Allow use of 'no_proxy' in the proxies argument
Add the ability to add 'no_proxy' and a value to the 'proxies'
dictionary argument.

https://github.com/kennethreitz/requests/issues/2817

Closes gh-2817
2017-02-10 09:41:54 -08:00
winterJ e8c0a99cb1 Remove unused module 2017-01-11 18:20:52 +09:00
Герасименко Евгений 0cb6ddaecf Fixed tests for python 2.x. 2016-12-29 10:30:56 +07:00
Герасименко Евгений 1c34ac3ae6 Fixed detection of utf-32-be by BOM. 2016-12-29 10:21:32 +07:00
Nate Prewitt d52e9b8c80 updated tests with IDNA encoded and IPv6 urls 2016-11-21 08:22:37 -07:00
Cory Benfield 595a409a18 Merge pull request #3627 from nateprewitt/remove_update_call
remove RequestsCookieJar specific update call
2016-10-27 20:53:18 +01:00
Nate Prewitt 390a499e81 test different CookieJar types for add_dict_to_cookiejar 2016-10-27 13:22:45 -06:00
Mohamed Elawadi f5b5c293b9 fix issue when the file-like object raises an IOError with tell 2016-10-18 11:09:25 +02:00
Cory Benfield 5524472cc7 Merge pull request #3535 from nateprewitt/3339_avoid_getvalues
avoid use of getvalues in super_len
2016-09-14 08:10:28 +01:00
Nate Prewitt f5c59743e7 adding tests for super_len conditional flow 2016-08-25 16:56:01 -06:00
Michael Hunsinger 7c80222afa Fixed another scheme proxy over "all" priority 2016-08-22 21:01:13 -06:00
Michael Hunsinger 77b068bb9e Fixed bug to give scheme proxy priority over "all" 2016-08-21 10:59:33 -06:00
kennethreitz fb01456061 Merge pull request #3429 from nateprewitt/docstring_cleanup
Docstring cleanup
2016-07-20 18:38:38 -04:00
Nate Prewitt b7809acb47 making class and function docstrings consistent 2016-07-20 11:43:47 -06:00
Nate Prewitt 2d4a89f5dc adding in pep8 fixes 2016-07-20 10:30:08 -06:00
Nate Prewitt 15a3869006 making module docstrings and coding comments consistent 2016-07-19 14:51:14 -06:00
Nate Prewitt 71050e9ab9 adding in slice_length fix and test for chunk_size=None (#3370) 2016-07-02 15:56:20 -05:00
Ian Cordasco cd4e6b9aef Merge pull request #3185 from brettdh/3183-support-all-proxy-env-var
Support ALL_PROXY environment variable
2016-05-17 10:42:31 -05:00
Kumar Varadarajulu b94decc47c Combined tests to one tests for should_bypass_proxies method 2016-05-16 10:49:37 +00:00
Kumar Varadarajulu f59a95713e Added tests for should_bypass_proxies function 2016-05-16 10:40:22 +00:00
Brett Higgins 4bf8866172 Add 'all' proxy selection to select_proxy
It seems it's necessary both in pulling all_proxy from the environment
(rebuild_proxies) and deciding which proxy to use (select_proxy).

Also added new functional test.
2016-05-13 15:30:38 -04:00
John R. Lenton 4e7beef860 utils: let select_proxy not raise an exception when url has no hostname 2016-04-26 11:22: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
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
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
Cory Benfield c02520ed99 Make sure we reset environment variables.
Turns out nose runs all the tests in one process, so changing the
os.environ dictionary makes everything go horribly wrong.
2012-11-18 12:31:55 +00:00
Cory Benfield 8da100f652 Respect the no_proxy environment variable.
This change is in response to issue #879.
2012-11-18 12:06:33 +00:00
Martijn Pieters e26ccb34eb Fix the smoke test in the face of UTF-16 surrogate pairs.
If the random data starts with a UTF-16 BOM *and* the next two bytes are for a character in the `\ud800`-`\udfff` range decoding would fail. Small chance, but still possible.

Extend it to check the UTF-8 error as well. The goal is to test that the guesser was *mostly* correct, and to verify the cases where it wasn't that it was to be expected. Most of all that the function doesn't buckle under wildly unexpected data.
2012-10-26 12:15:27 +02:00
Martijn Pieters be01a35ef1 Better not call it chr, rename to byteschr. 2012-10-25 18:27:21 +02:00
Martijn Pieters a4be9a2578 Redefine the unichr and bytes-variant of chr at module level.
Needed to appease Travis; it's python 2.6 and 2.7 builds are weird and the `__builtins__` dict is not following CPython conventions.
2012-10-25 18:22:07 +02:00
Martijn Pieters 9832bd8917 Correct a c&p mistake: set a correct docstring for the unit test class. 2012-10-25 17:56:19 +02:00
Martijn Pieters 4decc7986e Use a JSON-specific encoding detection when no encoding has been specified.
JSON *must* be encoded using UTF-8, UTF-16 or UTF-32 (see the [RFC][1]; detect the encoding based on the fact that JSON always starts with 2 ASCII characters.

[1]: http://tools.ietf.org/html/rfc4627#section-3
2012-10-25 17:43:52 +02:00