The gate 34 tests were not running any tests because there was no
tox target. This changes tox-tmpl.ini (and the resulting tox.ini) to
add support for python 34 and remove support for anything that is
not py34 or py27-based.
To make the python3 tox environments work, the remote zip of a suds
fork has been replaced with suds-jurko, a relatively modern fork of
the original suds that supports python2 and 3.
Some tests needed to be fixed to deal with two main problems:
* reponse bodies being bytes
* Exceptions not having a .message attribute (.args[0] is used
instead)
* the test_flask tests were not being run for python3, they are now
* wsmeext/sphinxext.py intermittently fails due to the dictionary
changing size in flight, getting the keys prior to iteration fixes
it
Both 27 and 34 should be running 420 tests as of this commit.
Change-Id: I837c249714fd957790ea84aa2fd9ad994a39c5ea
This patch is extending the Response object and the Pecan extension
to make it possible to return a non-default return type (just like it
already supports retuning a non default status code).
This is useful when the return code of a function is 204 (No Response) for
that case we automatically set the return_type to be None and guarantee
that the response body is empty and the content-lentgh is 0. Which if
not done can cause tools consuming the API to misbehave.
Change-Id: I629c3e2d5dc169154e5af044f1b8f804e4b87e23
This makes sure that when the body is decoded we run the validation
process on it.
Fixes-Bug: #1220678
Change-Id: I765a6ce8c8097ef0e0a734804242e9fcee4ffbcf
Added custom error status code for ClientSideError
exception instead of hardcoded value 400.
Fixed case when user exception with client error code
formatted as server error.
Pecan extension fixed.
Change-Id: I2663db0aa88538b722eb2783d130585b0fc2335b
- Makes sure we always run Pecan test and that there's no regression.
There's no real need to split them out as they are not invasive.
Also that reduces the number of environment a bit.
- This also fixes Pecan tests on python2.6
- This also fixes Pecan tests on python3.3
- This also enables Pecan tests on python3.2
Change-Id: I57070b0bd785fb3d445f432973f15825abccbdd5
For this purposes I added addiitional processing of original
exceptions at wsme/wsmeext/pecan.py. For exception's validation
special validator was added to wsme/wsmeext/utils.py. Also
functionality was reworked to be compatible with python3.3
Fixes bug#1214073
Change-Id: Ib1cd0b274bda11f62298848ebcd55b3f6641757c