Back to index

python3.2  3.2.2
Public Member Functions
test.test_xmlrpc.FaultTestCase Class Reference

List of all members.

Public Member Functions

def test_repr
def test_dump_fault
def test_dotted_attribute

Detailed Description

Definition at line 172 of file test_xmlrpc.py.


Member Function Documentation

Definition at line 188 of file test_xmlrpc.py.

00188 
00189     def test_dotted_attribute(self):
00190         # this will raise AttirebuteError because code don't want us to use
00191         # private methods
00192         self.assertRaises(AttributeError,
00193                           xmlrpc.server.resolve_dotted_attribute, str, '__add')
00194         self.assertTrue(xmlrpc.server.resolve_dotted_attribute(str, 'title'))

Here is the call graph for this function:

Definition at line 178 of file test_xmlrpc.py.

00178 
00179     def test_dump_fault(self):
00180         f = xmlrpclib.Fault(42, 'Test Fault')
00181         s = xmlrpclib.dumps((f,))
00182         (newf,), m = xmlrpclib.loads(s)
00183         self.assertEqual(newf, {'faultCode': 42, 'faultString': 'Test Fault'})
00184         self.assertEqual(m, None)
00185 
00186         s = xmlrpclib.Marshaller().dumps(f)
00187         self.assertRaises(xmlrpclib.Fault, xmlrpclib.loads, s)

Here is the call graph for this function:

Definition at line 173 of file test_xmlrpc.py.

00173 
00174     def test_repr(self):
00175         f = xmlrpclib.Fault(42, 'Test Fault')
00176         self.assertEqual(repr(f), "<Fault 42: 'Test Fault'>")
00177         self.assertEqual(repr(f), str(f))

Here is the call graph for this function:


The documentation for this class was generated from the following file: