Back to index

moin  1.9.0~rc2
Functions | Variables
test_xmlrpc Namespace Reference

Functions

def test_fault_serialization
def test_getAuthToken

Variables

list coverage_modules = ['MoinMoin.xmlrpc']

Function Documentation

test MoinMoin.xmlrpc.xmlrpc_system_multicall Fault serialization

Definition at line 15 of file test_xmlrpc.py.

00015 
00016 def test_fault_serialization(request):
00017     """test MoinMoin.xmlrpc.xmlrpc_system_multicall Fault serialization"""
00018 
00019     def xmlrpc_return_fault():
00020         return Fault(666, "Fault description")
00021 
00022     xmlrpc = XmlRpcBase(request)
00023     xmlrpc.xmlrpc_return_fault = xmlrpc_return_fault
00024     args = [{'methodName': 'return_fault', 'params': []}]
00025 
00026     print """If a XML RPC method returns a Fault, we should get a failure response
00027     instead of a serialized Fault, as it happened in the past. See revision
00028     8b7d6d70fc95 for details"""
00029 
00030     result = xmlrpc.xmlrpc_system_multicall(args)
00031     assert type(result[0]) is dict
00032     assert result[0].has_key("faultCode") and result[0].has_key("faultString")

def test_xmlrpc.test_getAuthToken (   request)
Tests if getAuthToken passes without crashing 

Definition at line 33 of file test_xmlrpc.py.

00033 
00034 def test_getAuthToken(request):
00035     """ Tests if getAuthToken passes without crashing """
00036     xmlrpc = XmlRpcBase(request)
00037     assert xmlrpc.xmlrpc_getAuthToken("Foo", "bar") == ""


Variable Documentation

list test_xmlrpc.coverage_modules = ['MoinMoin.xmlrpc']

Definition at line 38 of file test_xmlrpc.py.