summaryrefslogtreecommitdiff
path: root/tests
Commit message (Collapse)AuthorAgeFilesLines
* make tests pass after 2031Bernhard M. Wiedemann2018-02-211-1/+1
|
* 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.
* Python 3: use compatible print syntax in example textpy3kNils Philippsen2015-11-121-2/+2
|
* Python 3: ignore exception details in doctestsNils Philippsen2015-09-101-1/+4
| | | | Exception details are formatted differently between Python 2 and 3.
* Python 3: add workarounds for cgi.FieldStorageNils Philippsen2015-08-201-1/+58
| | | | | | | cgi.FieldStorage keeps some keys as str, some as the repr() of the byte-encoded key, duh. Fixes (well...): tests.test_cgiapp.test_form
* Python 3: Use the same python interpreter for CGI scripts.Nils Philippsen2015-08-201-0/+23
| | | | Fixes tests.test_cgiapp
* Python 3: App must always return binary type.Nils Philippsen2015-08-191-1/+1
| | | | Fixes tests.test_wsgiwrappers.test_wsgirequest_charset
* test_wsgirequest_charset: Use UTF-8 instead of iso-8859-1test_wsgirequest_charset_use_UTF-8_instead_of_iso-8859-1Marc Abramowitz2015-04-301-3/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | because it seems that the defacto standard for encoding URIs is to use UTF-8. I've been reading about url encoding and it seems like perhaps using an encoding other than UTF-8 is very non-standard and not well-supported (this test is trying to use `iso-8859-1`). From http://en.wikipedia.org/wiki/Percent-encoding > For a non-ASCII character, it is typically converted to its byte sequence in > UTF-8, and then each byte value is represented as above. > The generic URI syntax mandates that new URI schemes that provide for the > representation of character data in a URI must, in effect, represent > characters from the unreserved set without translation, and should convert > all other characters to bytes according to UTF-8, and then percent-encode > those values. This requirement was introduced in January 2005 with the > publication of RFC 3986 From http://tools.ietf.org/html/rfc3986: > Non-ASCII characters must first be encoded according to UTF-8 [STD63], and > then each octet of the corresponding UTF-8 sequence must be percent-encoded > to be represented as URI characters. URI producing applications must not use > percent-encoding in host unless it is used to represent a UTF-8 character > sequence. From http://tools.ietf.org/html/rfc3987: > Conversions from URIs to IRIs MUST NOT use any character encoding other than > UTF-8 in steps 3 and 4, even if it might be possible to guess from the > context that another character encoding than UTF-8 was used in the URI. For > example, the URI "http://www.example.org/r%E9sum%E9.html" might with some > guessing be interpreted to contain two e-acute characters encoded as > iso-8859-1. It must not be converted to an IRI containing these e-acute > characters. Otherwise, in the future the IRI will be mapped to > "http://www.example.org/r%C3%A9sum%C3%A9.html", which is a different URI from > "http://www.example.org/r%E9sum%E9.html". See issue #7, which I think this at least partially fixes.
* tests/test_httpserver.py: Add test_environ_with_multiple_valuesMarc Abramowitz2015-04-281-0/+16
| | | | Tests when there are two `Host:` headers present.
* tests/test_httpserver.py: Use `email` module instead of `mimetools`Marc Abramowitz2015-04-281-2/+2
| | | | because `mimetools` is deprecated and doesn't work in Python 3.
* Add tests/test_httpserver.pyMarc Abramowitz2015-04-271-0/+29
| | | | | | | which contains a test for the issue in BB-4, where the WSGI environment has strings with commas in them that don't belong. See issue #4.
* Revert change on paste.util.quoting.html_quote()Victor Stinner2015-04-231-2/+6
| | | | | On Python 2, html_quote(unicode) returns again bytes to restore backward compatibility.
* Fix paste.util.html_quote(unicode): don't encode the string to escape itVictor Stinner2015-04-221-0/+24
|
* Cleanup imports in test_fileappVictor Stinner2015-04-221-12/+4
|
* Fix pyflakes warnings in testsVictor Stinner2015-04-228-18/+2
| | | | | * Remove unused imports * Remove unused variables
* Fix test_exceptions on Python 3Victor Stinner2015-04-223-14/+15
|
* Remove doctest24Victor Stinner2015-04-221-1/+1
|
* Update test_fileapp according to changeset b3f56e5b43e8Victor Stinner2015-04-211-2/+2
| | | | Now HTTP status 206 is used even if the range is the full content.
* Fix fileapp on Python 3Victor Stinner2015-04-221-21/+30
| | | | | | | * Don't compare None with int * Add __next__() method (alias to next()). * HTTP body must be bytes * Don't use string.letters but an hardcoded string to not depend on the locale.
* Fix grantip on Python 3Victor Stinner2015-04-221-8/+11
|
* Fix test_config on Python 3Victor Stinner2015-04-221-26/+48
| | | | Reset config after each test
* Port test_errordocument on Python 3Victor Stinner2015-04-221-6/+6
| | | | On Python 3, encode body to UTF-8
* Fix cgitb_catcher on Python 3Victor Stinner2015-04-221-2/+5
|
* Port gzipper to Python 3Victor Stinner2015-04-221-5/+5
|
* Fix test_cgiapp on Python 3Victor Stinner2015-04-215-20/+19
|
* Port multidict to Python 3Victor Stinner2015-04-211-42/+44
|
* Port recursive to Python 3Victor Stinner2015-04-211-2/+2
| | | | HTTP body is bytes
* Fix test_registry on Python 3Victor Stinner2015-04-211-9/+27
| | | | HTTP body must be bytes
* Fix test_request_form on Python 3Victor Stinner2015-04-211-3/+3
| | | | | * wsgi.input must be a binary file, not a text file * HTTP body must be bytes
* Fix WSGIResponse on Python 3Victor Stinner2015-04-211-9/+10
| | | | | | | | | | | HTTP body must be bytes. Don't check if __iter__() method to check if content is a list or tuple, because bytes and str now have this method on Python 3. Instead, check explicitly for bytes and str types using the six module. Port wsgiwrappers test to Python 3, fix bytes/unicode issues: * HTTP body must be bytes * Filenames are native strings, request ensures that filenames are unicode
* Fix request, session and urlmap tests on Python 3Victor Stinner2015-04-213-13/+25
| | | | HTTP body must be bytes
* Port paste.auth to Python 3Victor Stinner2015-04-212-3/+11
| | | | | | * md5() and hmac expects bytes: on Python 3, encode text to utf-8 * Don't compare None with int * HTTP body must be bytes
* Fix urlparser tests on Python 3Victor Stinner2015-04-218-19/+30
| | | | HTTP body must be bytes
* Convert files from file format DOS to UNIXVictor Stinner2015-04-212-372/+372
|
* Strip trailing spacesVictor Stinner2015-04-2115-40/+40
|
* Python 3: convert dict.keys() result to list to get the first itemCyril Roelandt2014-03-181-2/+2
|
* Python 3: load xrange from six.movesCyril Roelandt2014-03-181-1/+2
|
* Python 3: Replace "for ... in dict.items()" with "for ... in ↵Cyril Roelandt2014-03-181-2/+2
| | | | | | six.iteritems(dict)" Same change for itervalues().
* Python 3: Use six types for stringsCyril Roelandt2014-03-181-8/+9
| | | | | * Replace (str, unicode) with (six.binary_type, six.text_type) * Replace basestring with (six.binary_type, six.text_type)
* Python 3: use new style of raise, replace "raise class, args" with "raise ↵Cyril Roelandt2014-03-181-1/+1
| | | | class(args)"
* Python 3: Use absolute import instead of relative importCyril Roelandt2014-03-182-2/+2
|
* Python 3: add parenthesis to print() to support Python 2 and Python 3Cyril Roelandt2014-03-189-17/+17
| | | | Use also "from __future__ import print_function".
* Python 3: Replace "dict.has_key(key)" with "key in dict"Cyril Roelandt2014-03-181-3/+3
|
* Python 3: Replace "except Exception, exc" with "except Exception as exc:"Cyril Roelandt2014-03-182-3/+3
|
* Python 3: use new names of standard library modulesCyril Roelandt2014-03-186-11/+29
| | | | Use "try/except ImportError" to try Python 2 and Python 3 names.
* Just a bit more paranoia in quoting comments, though I wasn't able to ↵Ian Bicking2010-09-141-0/+2
| | | | reproduce any actual issue
* Catch cookie errors when parsing cookies ↵Ian Bicking2010-09-021-0/+2
| | | | (http://trac.pythonpaste.org/pythonpaste/ticket/189)
* Improve errors when fetching an error page: ↵Ian Bicking2010-09-021-5/+14
| | | | http://trac.pythonpaste.org/pythonpaste/ticket/123