summaryrefslogtreecommitdiff
path: root/tests
Commit message (Collapse)AuthorAgeFilesLines
* add ipv6 support by setting address family (#50)Lekinho2020-02-121-1/+60
| | | * add ipv6 support by setting address family
* Update auth_tkt.py for python3 compatibility (#45)marzetas2020-01-261-0/+120
| | | | | | | | * Update auth_tkt.py urllib imports to work in python3 * Add tests for auth AuthTicket * Adapt auth_tkt to be python2 and python3 compatible
* Make gzip middleware stop producing a spurious response body on HEAD ↵Jason Madden2020-01-131-2/+10
| | | | | requests. (#44) Fixes #43
* LimitedLengthFile: Handle io.UnsupportedOperation from socket.tell(). (#35)Benjamin Peterson2019-09-091-0/+21
| | | On Python 3, socket.makefile() returns an object with a tell() method, but one that always raises io.UnsupportedOperation.
* TestApp: Make unicode urls always work. (#33)Benjamin Peterson2019-09-041-0/+7
| | | Passing a unicode url to get() always worked (assuming the url contained only ASCII), but it didn't work to post(), put(), or delete() if query parameters were included. This change fixes the latter cases.
* Make LimitedLengthFile file return empty bytes rather than empty string when ↵Benjamin Peterson2019-09-041-1/+9
| | | | it's done. (#32)
* Avoid copying FieldStorage if possible. (#30)Benjamin Peterson2019-08-291-5/+8
| | | | | On Python 3, cgi.FieldStorage has a __del__ method that closes the underlying file [1]. This means that if the copy made from UnicodeMultiDict._decode_value is garbage collected, the file underlying the original FieldStorage will be closed! Fix this by not copying FieldStorage if it is not required by decode_keys=False. I cannot think of a nice way to fix this problem if decode_keys=True. [1] https://github.com/python/cpython/commit/f79126f373a9d5c9b584a8db736fe490fcbfa77a
* Modify TestApp.encode_multipart to handle bytes filenames and params. (#29)3.1.1Benjamin Peterson2019-08-252-1/+29
| | | As the test shows, this fixes passing boths params and upload_files on Python 3.
* Fix WSGIResponse.__call__ on Python 3. (#27)Benjamin Peterson2019-07-241-0/+17
| | | Replace `isinstance(self.content, file)` with a duck type for the `read()` method. Having a read method is what PEP 333 defines as the minimum requirement for a "file-like" object.
* Fix quoting of bytestrings. (#23)Jelmer Vernooij2019-03-071-0/+2
|
* paste.fixture: fix form offset handling (#12)Daniel Hahler2018-10-311-0/+9
| | | | | It would fail if the length of bytes and unicode differs. It now passes non-bytes to `Form` directly.
* py3 fixes for form handling in paste.fixture (#8)Daniel Hahler2018-10-301-1/+10
| | | | | | | | | | | | | | | | | * py3 fixes for form handling in paste.fixture It uses "not six.PY2" in contrast to other places in the code to be forward-compatible. I've not looked too closely, but it might make sense to decode body/text in the beginning already, instead of having it as bytes internally?! Also, like mentioned in [1] already, it should probably use the correct source encoding?! 1: https://github.com/cdent/paste/blob/36e5b8bd16a6063ec654faf04541f3a20d19f7fe/paste/fixture.py#L820 * Add test, using/fixing SlowConsumer form app
* Pytest fixes (#9)Daniel Hahler2018-10-302-16/+16
| | | | | | | | | | | | | | | | | | | | | | | | * pytest: fix collection warnings via __test__=False Fixes > "cannot collect test class %r because it has a __init__ constructor Ref: https://github.com/pytest-dev/pytest/issues/2007 * pytest: configure testpaths This is faster with test collection. * pytest: fix warning with doctests Fixes > /usr/lib/python3.7/site-packages/_pytest/python.py:764: > RemovedInPytest4Warning: usage of Generator.Function is deprecated, > please use pytest.Function instead * Minor fixes around s/py.test/pytest/
* Fix up testing after switch to pytestChris Dent2018-10-232-1/+1
| | | | | | | | | | | | | | pytest exposes many warnings, some but not all of which are cleaned up here. The main switch is to use html.escape instead of cgi.escape. This inspired the addition of 'future' to requirements. The remaining warnings are related to pytest deprecations or over-eager test discovery. It is perhaps ironic that the switch to pytest is to avoid nose being mostly dead, and now we are using features in pytest that pytest wants to make dead. These are left for later cleanups, which means that running the tests is noisy.
* Merge pull request #1 from cdent/pytestChris Dent2018-10-236-36/+32
|\ | | | | Switch from nose to pytest
| * Switch from nose to pytestpytestMarc Abramowitz2016-03-086-36/+32
| |
| * Check paste.wsgilib.add_close._closedMarc Abramowitz2016-03-071-0/+2
| |
| * Add tests for `add_close` classMarc Abramowitz2016-03-071-0/+50
| |
| * Enable testing with pypytox_add_pypyMarc Abramowitz2016-03-071-2/+2
| | | | | | | | | | | | | | | | This involved: - Adding "pypy" to the `tox.ini` envlist. - Adding `# doctest: +IGNORE_EXCEPTION_DETAIL` to 2 doctests, because the traceback message text is slightly different on PyPy.
| * tox.ini: Add py35 to envlisttox_add_py35Marc Abramowitz2016-03-0765-0/+3385
|
* Fix proxy testChris Dent2018-10-231-4/+4
| | | | | | | | | | | The proxy test relied on pythonpaste.org being up and existing. It is neither. So instead we use httpbin.org which is often used for this kind of thing. Unfortunately httpbin is now a react app which means a lot of the HTML is generated client-side, which means we need to choose wisely. As the original comments indicate, the test is not particularly robust and remains so.
* make tests pass after 2031Bernhard M. Wiedemann2018-02-2166-0/+3437