OPSI.web2.test.test_xmlrpc module¶
Test XML-RPC support.
-
exception
OPSI.web2.test.test_xmlrpc.TestRuntimeError¶ Bases:
exceptions.RuntimeErrorFake RuntimeError for testing purposes.
-
exception
OPSI.web2.test.test_xmlrpc.TestValueError¶ Bases:
exceptions.ValueErrorFake ValueError for testing purposes.
-
class
OPSI.web2.test.test_xmlrpc.XMLRPCServerBase(methodName='runTest')¶ Bases:
OPSI.web2.test.test_server.BaseCaseThe parent class of the XML-RPC test classes.
-
method= 'POST'¶
-
setUp()¶
-
version= (1, 1)¶
-
-
class
OPSI.web2.test.test_xmlrpc.XMLRPCServerGETTest(methodName='runTest')¶ Bases:
OPSI.web2.test.test_xmlrpc.XMLRPCServerBaseAttempt access to the RPC resources as regular HTTP resource.
-
setUp()¶
-
test_childGET()¶ Try to access an XML-RPC method as a regular resource via GET.
-
test_rootGET()¶ Test a simple GET against the XML-RPC server.
-
-
class
OPSI.web2.test.test_xmlrpc.XMLRPCServerPOSTTest(methodName='runTest')¶ Bases:
OPSI.web2.test.test_xmlrpc.XMLRPCServerBaseTests for standard XML-RPC usage.
-
test_RPCFailures()¶ Ensure that failures behave as expected.
-
test_RPCFaults()¶ Ensure that RPC faults are properly processed.
-
test_RPCMethods()¶ Make RPC calls of the defined methods, checking for the expected results.
-
-
class
OPSI.web2.test.test_xmlrpc.XMLRPCTestIntrospection(methodName='runTest')¶ Bases:
OPSI.web2.test.test_xmlrpc.XMLRPCServerBase-
setUp()¶ Introspection requires additional setup, most importantly, adding introspection to the root object.
-
test_listMethods()¶ Check that the introspection method “listMethods” returns all the methods we defined in the XML-RPC server.
-
test_methodHelp()¶ Check the RPC methods for docstrings or .help attributes.
-
test_methodSignature()¶ Check that the RPC methods whose signatures have been set via the .signature attribute (on the method) are returned as expected.
-
-
class
OPSI.web2.test.test_xmlrpc.XMLRPCTestResource¶ Bases:
OPSI.web2.xmlrpc.XMLRPCThis is the XML-RPC “server” against which the tests will be run.
-
FAILURE= 666¶
-
NOT_FOUND= 23¶
-
SESSION_EXPIRED= 42¶
-
addSlash= True¶
-
getFunction(functionPath)¶
-
xmlrpc_add(request, a, b)¶ This function add two numbers.
-
xmlrpc_complex(request)¶
-
xmlrpc_defer(request, x)¶ Help for defer.
-
xmlrpc_deferFail(request)¶
-
xmlrpc_deferFault(request)¶
-
xmlrpc_dict(request, map, key)¶
-
xmlrpc_fail(request)¶
-
xmlrpc_fault(request)¶
-
xmlrpc_pair(request, string, num)¶ This function puts the two arguments in an array.
-