Commit Graph

15 Commits

Author SHA1 Message Date
Braulio Valdivielso Martínez 3c3bde5381 Remove unwanted changes 2016-03-05 23:10:13 +01:00
Braulio Valdivielso Martínez 44161ac373 Moved TestTestServer to its own file 2016-03-04 19:35:46 +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 141db281d1 Merged master 2016-03-03 21:44:21 +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