goat.tests package

Submodules

goat.tests.test_authorities_manager module

class goat.tests.test_authorities_manager.TestAuthorityManager(methodName='runTest')[source]

Bases: unittest.case.TestCase

test_generic()[source]
test_generic_get(*args, **keywargs)[source]
test_generic_nonsense()[source]
test_get_globs()[source]
test_get_method_config()[source]
test_get_nsmap()[source]
test_init()[source]
class goat.tests.test_authorities_manager.TestAuthorityManagerVIAF(methodName='runTest')[source]

Bases: unittest.case.TestCase

test_generic()[source]
test_generic_get(*args, **keywargs)[source]
test_generic_nonsense()[source]
test_get_globs()[source]
test_get_method_config()[source]
test_get_nsmap()[source]
test_init()[source]

goat.tests.test_authorities_util module

class goat.tests.test_authorities_util.TestGenerateRequest(methodName='runTest')[source]

Bases: unittest.case.TestCase

goat.authorities.util.generate_request() should return a callable that will dispatch a request with provided parameters and/or headers.

test_get(*args, **keywargs)[source]

By default, will generate a callable that performs a GET request using the configured parameters.

test_get_not_required(*args, **keywargs)[source]

If a paramter is not required (default), no error will be raised if the function does not receive it.

test_get_required(*args, **keywargs)[source]

If a paramter is required, a TypeError will be raised if the callable does not receive it.

test_post(*args, **keywargs)[source]

If a POST request, will call requests.post with data.

class goat.tests.test_authorities_util.TestJSONPath(methodName='runTest')[source]

Bases: unittest.case.TestCase

test_no_namespace_no_attrib()[source]

The default behavior of goat.authorities.util.parse_json_path() is to return a callable that, when passed a dict parsed from JSON finds the element with specified name and returns its value (presumably CDATA).

test_no_namespace_no_attrib_multiple()[source]

The aterisk * operator is used to indicate that multiple elements should be expected.

test_no_namespace_no_attrib_multiple_levels()[source]

The path can have several levels, separated by ‘/’ characters.

test_no_namespace_no_attrib_multiple_levels_multivalue()[source]

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.

test_no_namespace_no_attrib_sep()[source]

If a separator is provided, should use that separator to individuate multiple values from a single element.

class goat.tests.test_authorities_util.TestParseXMLPath(methodName='runTest')[source]

Bases: unittest.case.TestCase

test_namespace_no_attrib()[source]

Should be able to navigate namespaced paths.

test_no_namespace_no_attrib()[source]

The default behavior of goat.authorities.util.parse_xml_path() is to return a callable that, when passed an ET.Element, finds the element with specified name and returns its value (presumably CDATA).

test_no_namespace_no_attrib_multiple()[source]
test_no_namespace_no_attrib_multiple_levels()[source]

The path can have several levels, separated by ‘/’ characters.

test_no_namespace_no_attrib_multiple_levels_multivalue()[source]

Iteration can happen at any level of the path.

test_no_namespace_no_attrib_sep()[source]

If a separator is provided, should use that separator to individuate multiple values from a single element.

test_no_namespace_with_attribute()[source]

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.

Module contents