Commit Graph

1139 Commits

Author SHA1 Message Date
Jurko Gospodnetić 3d3f732390 update version information for the suds-jurko 0.6 release 2014-01-24 17:33:58 +01:00
Jurko Gospodnetić 0352ec21cc Added tag release-0.6 for changeset 875d5386353e 2014-01-24 17:27:02 +01:00
Jurko Gospodnetić f1150e5045 update version information for the suds-jurko 0.6 release 2014-01-24 17:26:23 +01:00
Jurko Gospodnetić 9f7ccacb84 update todo list 2014-01-24 17:21:56 +01:00
Jurko Gospodnetić 56e4ff5c28 add a note document with examples for traversing suds library's data model 2014-01-24 17:08:25 +01:00
Jurko Gospodnetić a91f233cf8 add a note document on suds library's argument parsing
These are notes collected while working on updating suds to report extra input
argument errors.
2014-01-24 12:44:14 +01:00
Jurko Gospodnetić 438601e9eb start project's internal notes documentation
Added a 'notes/' project folder. Described the new folder both in a readme.txt
file contained in that folder and in the project's central HACKING.rst
documentation. The folder and its *.rst/*.txt content is included in the
project's source distribution, but is not included in project builds &
installations.

Updated project release notes.
Updated todo list.
2014-01-23 19:53:33 +01:00
Jurko Gospodnetić e85516f1c8 clean up project README.rst documentation - stylistic changes
Old release notes reviewed and converted .rst format.
2014-01-23 17:20:28 +01:00
Jurko Gospodnetić af39259484 rename HACKING.txt to HACKING.rst 2014-01-23 00:07:18 +01:00
Jurko Gospodnetić 5cd4d38d19 clean up HACKING.txt
Converted to .rst format.
Minor stylistic wording and section organization changes.
.rst layout checked using BitBucket's RST viewer.
2014-01-22 23:19:46 +01:00
Jurko Gospodnetić 934f5830a2 document available standards conformance notes for the project 2014-01-22 18:09:20 +01:00
Jurko Gospodnetić 14540003ce correct documentation typo in HACKING.txt 2014-01-22 17:51:20 +01:00
Jurko Gospodnetić af4c97f1b4 document setuptools 2.0 dropping support for Python 2.4 & 2.5 2014-01-22 17:47:39 +01:00
Jurko Gospodnetić ffc24b0774 update todo list 2014-01-21 20:04:22 +01:00
Jurko Gospodnetić b4f323728d update release notes 2014-01-21 20:02:51 +01:00
Jurko Gospodnetić cf809091aa merge the assure-that-all-parameters-are-consumed-1385966771465 feature branch
Extra arguments used when making a web service operation call are now reported
similar to how this is done for regular Python functions. The extra argument
error reporting may be disabled using the new 'extraArgumentErrors' suds option.

Basic idea and the initial implementation for this feature contributed by
Bouke Haarsma.

Additional changes made as a part of working on the new functionality:

Binding agnostic part of suds's web service operation invocation argument
parsing extracted into a separate module. The code has been extracted mostly
from the 'Document' binding implementation, and has not yet been applied to the
'RPC' binding but we are getting there. Once this is done, 'RPC' binding support
should match the one already implemented for the 'Document' binding, e.g.
support for automatically unwrapping simple input parameter structures &
reporting extra parameters.

Test updates:
  * Split up some web service operation invocation request construction tests
    into:
      - parameter definition tests
      - argument parsing tests
      - binding specific request construction tests.
  * Many new tests added & existing ones extended.
  * Several redundant tests removed.
  * Better test support when running with disabled assertion optimizations
    enabled.
  * Implemented an indirect_parametrize pytest plugin to help with implementing
    some more complex test case parametrizations without unnecessary test data
    duplication.

Several of the new or updated tests have been marked as 'expected to fail' as
they demonstrate known issues with suds. None of the issues have been newly
introduced by the new feature, but have only been explicitly uncovered while
working on it.
2014-01-21 10:24:03 +01:00
Jurko Gospodnetić d824b5b3d4 test code cleanup
Removed unnecessary imports in 'tests/__init__.py'.

No more code from the original suds library implementation left in
'tests/__init__.py' so updated the module's author information.
2014-01-21 08:45:48 +01:00
Jurko Gospodnetić bce233242c restrict test assertion usage to test modules only
This fixes all xpass test results reported when running our test suite with the
'disable assertions' optimization enabled ('-O' Python command-line option)
using Python interpreter versions 2.6 and above.

Testing assertions located outside a pytest test module (e.g. inside some
project specific shared testing utility function) are ignored when running the
tests using Python's disable assertions optimization while pytest takes care to
preserve all assertions located inside its test modules.
2014-01-21 08:43:32 +01:00
Jurko Gospodnetić 815893b6ef add more document/literal binding specific request construction tests
Added tests prepared based on test input used in previously removed redundant
extra parameter tests.

Several of the new tests have been marked as 'expected to fail' due to known
suds library implementation issues:
 - empty choice member items not supported
 - unsupported minOccurs/maxOccurs attributes on all/choice/sequence order
   indicators,
 - buggy non-optional choice parameter handling
2014-01-21 08:09:09 +01:00
Jurko Gospodnetić 7653ddc49e stylistic test data cleanup
All no-content XML tags now closed the same in the test_request_construction.py
test data.
2014-01-20 16:42:23 +01:00
Jurko Gospodnetić 7eca409e35 add an indirect_parametrize pytest plugin to the test suite
The new pytest plugin allows a clean & well integrated way of defining test
parametrizations with data constructed using a function instead of having to be
explicitly passed to a pytest.mark.parametrize() call.

An alternative would be to use a function constructing pytest.mark.parametrize()
arguments but the current solution causes less clutter when used and seems more
intuitive to someone used to using pytest.mark.parametrize().
2014-01-20 16:37:18 +01:00
Jurko Gospodnetić 05f7a7a815 document argument parsing rules in the parse_args() docstring 2014-01-17 23:34:11 +01:00
Jurko Gospodnetić 2aeb0f4025 update comment line wrapping 2014-01-17 23:33:36 +01:00
Jurko Gospodnetić b2757588bc remove redundant extra parameter tests from test_request_construction.py
Removed tests have been covered by related argument parsing and input parameter
definition structure tests.

All remaining extra parameter tests are the ones using input WSDL schemas not
directly representable by suds library's current internal parameter definition
structure have and been moved to the test_input_parameters.py test module. Most
of them were already marked as 'expected to fail' and all of them now serve only
as reminders to fix some part of the suds library implementation.
2014-01-17 23:33:10 +01:00
Jurko Gospodnetić 0ffa334e2f test code cleanup - reordered test functions alphabetically 2014-01-16 22:15:54 +01:00
Jurko Gospodnetić 3b22ae8d08 test parameter definition structure for a single built-in typed input element 2014-01-16 22:10:02 +01:00
Jurko Gospodnetić eedbfc155b update tests to check whether input parameters get unwrapped
Several tests in the test_input_parameters.py module expect their test web
service operation to be called using wrapped or unwrapped input parameters.
Those tests have now been updated to explicitly check their expectations.
2014-01-16 21:19:24 +01:00
Jurko Gospodnetić 7573bddcb4 add more unwrapped input parameter definition test cases 2014-01-16 19:11:40 +01:00
Jurko Gospodnetić 8ac9959798 refactor test_input_parameters.py test code
Prepared a utility function for constructing preparing expected parameter
definition structures based on given parameter type XSD schema. This will help
avoid code duplication when cloning existing test cases using new input data.
2014-01-16 18:06:41 +01:00
Jurko Gospodnetić 18a03fe603 refactor test_input_parameters.py test code
Made the _unwrappable_wsdl() helper function more generic so it can be used for
constructing WSDL schemas with different input parameter type definition XSD
schemas.
2014-01-16 14:29:47 +01:00
Jurko Gospodnetić f821a1df3a add new test module dealing with input parameter structure testing
Tests in this module should make related tests in test_suds.py &
test_request_construction.py test modules redundant, while at the same time
being concentrated on more specific part of the suds library functionality.
2014-01-16 13:12:48 +01:00
Jurko Gospodnetić fed8da82ee merge work done on the default branch 2014-01-16 12:15:27 +01:00
Jurko Gospodnetić a64b5a5e66 document the suds 'unwrap' option 2014-01-16 12:13:41 +01:00
Jurko Gospodnetić 36ddfba17c code cleanup - minor, stylistic 2014-01-16 12:11:33 +01:00
Jurko Gospodnetić 0f1d605ff3 merge work done on the default branch 2014-01-16 01:05:34 +01:00
Jurko Gospodnetić b3fbe7893d correct faulty assertion in test_fault_reply_with_unicode_faultstring()
Due to a typo, was not actually testing the content of a caught WebFault fault
string.
2014-01-15 22:29:09 +01:00
Jurko Gospodnetić e99d8c0451 test code cleanup
pytest test framework's pytest.raised() assertion function returns the a
wrapper around the caught exception object. New code uses this to check the
caught exception instead of hand crafted try:/catch: blocks. Special care is
taken to explicitly delete any local exception references so they would not
cause uncollectable reference cycles.

Inlined the internal _expect_error() worker in the test_request_construction.py
test module and a similar _expect_error_worker() worker in the
test_argument_parser.py module.
2014-01-15 22:26:29 +01:00
Jurko Gospodnetić 6229ecfe58 refactor the ArgParser interface to a parse_args() function
This makes the rules for using the argument parsing implementation much
simpler and reduces a chance of invalid usage errors. User code now just calls
a single function instead of having to first create a parser object and then
calling several of its methods in a precisely defined order.

The original ArgParser function object is still used but has now been renamed
to _ArgParser and is now considered an internal implementation detail for the
argument parsing implementation.

The rules for deciding what parameter definitions are acceptable have been
relaxed a bit:
  * User no longer needs to explicitly specify whether the web service
    operation is being invoked using suds library's automatic input parameter
    unwrapping. This is now determined internally based on the passed input
    parameter ancestry information.
  * As far as argument parsing is concerned, it is now ok to call a web service
    operation using multiple parameters, some of which are automatically
    unwrapped, and some are not. This feature is not actually used in suds
    code, but the restriction here was pretty much an artificial one and only
    added unnecessary code.

Updated many related docstring comments.
Updated related unit tests.
2014-01-15 12:08:29 +01:00
Jurko Gospodnetić 45436db477 test code cleanup - ArgParser tests reordered alphabetically.
test_unwrapped_parameters_must_share_ancestry() was in an incorrect position.
2014-01-14 18:38:34 +01:00
Jurko Gospodnetić 4d9bad2265 add more test_unwrapped_arg_counts() ArgParser test cases
Added based on existing document binding specific extra parameter handling
tests in test_request_construction.py plus some extra scenarions invented as
well.
2014-01-14 18:36:45 +01:00
Jurko Gospodnetić 3bfc98a3ba improve input validation in test_unwrapped_arg_counts() ArgParser test
Now makes sure that in a single test case input data set, whenever a specific
ancestry item is used, it is always used with the same parent ancestry.
2014-01-14 17:54:46 +01:00
Jurko Gospodnetić 4cb838dd00 update test_unwrapped_arg_counts() ArgParser test - arg value checking
Used arguments are now all separate objects so the test makes sure all the
passed argument values get assigned to their correct input parameters.
2014-01-14 17:10:59 +01:00
Jurko Gospodnetić 7729fa3b6a add arg counting ArgParser test - choice with non-empty sequence 2014-01-14 17:03:30 +01:00
Jurko Gospodnetić 109ffe9713 add unwrapped parameter ArgParser tests
The added test is run for only some of the possibly interesting scenarios. At
the moment, it tests only operations taking at most one input parameter, but
has been prepared with as a general enough test template so it can be run in
more complex scenarios as well.
2014-01-14 16:18:09 +01:00
Jurko Gospodnetić beb3da9418 add ArgParser test - disjoint unwrapped parameter ancestry errors 2014-01-14 13:19:36 +01:00
Jurko Gospodnetić e58022778b test code cleanup 2014-01-14 13:00:28 +01:00
Jurko Gospodnetić 3c3f53eb65 make ArgParser no longer modify its passed args/kwargs 2014-01-14 12:57:44 +01:00
Jurko Gospodnetić 078b2c3ed3 code cleanup - line wrapping 2014-01-14 12:28:33 +01:00
Jurko Gospodnetić 43270a95cb make 'extra param values' include 'multiple values for single choice' errors
Disabling extra parameter value errors should also disable errors reporting
multiple alternative values being defined for different elements inside the
same choice parameter group. This fixes potential backward compatibility issues
in case the new 'extra parameter value' errors are disabled.
2014-01-13 20:50:37 +01:00
Jurko Gospodnetić 691deff470 return args_required & args_allowed from ArgParser.finish() to ease testing
This allows unit tests to read and test this information without having to use
failing input and then parsing the resulting error message string.
2014-01-13 20:32:22 +01:00