goat.tests package¶
Submodules¶
goat.tests.test_authorities_manager module¶
Bases:
unittest.case.TestCase
Bases:
unittest.case.TestCase
goat.tests.test_authorities_util module¶
Bases:
unittest.case.TestCase
goat.authorities.util.generate_request()
should return a callable that will dispatch a request with provided parameters and/or headers.By default, will generate a callable that performs a GET request using the configured parameters.
If a paramter is not required (default), no error will be raised if the function does not receive it.
If a paramter is required, a TypeError will be raised if the callable does not receive it.
If a POST request, will call
requests.post
withdata
.
Bases:
unittest.case.TestCase
The default behavior of
goat.authorities.util.parse_json_path()
is to return a callable that, when passed adict
parsed from JSON finds the element with specified name and returns its value (presumably CDATA).
The aterisk * operator is used to indicate that multiple elements should be expected.
The path can have several levels, separated by ‘/’ characters.
Iteration can happen at any level of the path. An asterisk following a path element indicates that the element belongs to an object inside of an array. This is slightly counterintuitive, but keeps the syntax consistent with the XML syntax.
If a separator is provided, should use that separator to individuate multiple values from a single element.
Bases:
unittest.case.TestCase
Should be able to navigate namespaced paths.
The default behavior of
goat.authorities.util.parse_xml_path()
is to return a callable that, when passed anET.Element
, finds the element with specified name and returns its value (presumably CDATA).
The path can have several levels, separated by ‘/’ characters.
Iteration can happen at any level of the path.
If a separator is provided, should use that separator to individuate multiple values from a single element.
If an attribute name is included in square brackets, will return the value of that attribute rather than the CDATA child of the matched element.