Back to index

python3.2  3.2.2
Public Member Functions | Public Attributes | Static Public Attributes
test.test_xmlrpc.KeepaliveServerTestCase1 Class Reference
Inheritance diagram for test.test_xmlrpc.KeepaliveServerTestCase1:
Inheritance graph
[legend]
Collaboration diagram for test.test_xmlrpc.KeepaliveServerTestCase1:
Collaboration graph
[legend]

List of all members.

Public Member Functions

def test_two
def setUp
def tearDown

Public Attributes

 evt

Static Public Attributes

 requestHandler = None
int request_count = 1
tuple threadFunc = staticmethod(http_server)

Detailed Description

Definition at line 625 of file test_xmlrpc.py.


Member Function Documentation

Reimplemented from test.test_xmlrpc.BaseServerTestCase.

Definition at line 618 of file test_xmlrpc.py.

00618 
00619     def setUp(self):
00620         #clear request log
00621         self.RequestHandler.myRequests = []
00622         return BaseServerTestCase.setUp(self)
00623 
00624 #A test case that verifies that a server using the HTTP/1.1 keep-alive mechanism
#does indeed serve subsequent requests on the same connection

Here is the caller graph for this function:

Definition at line 437 of file test_xmlrpc.py.

00437 
00438     def tearDown(self):
00439         # wait on the server thread to terminate
00440         self.evt.wait(4.0)
00441         # XXX this code does not work, and in fact stop_serving doesn't exist.
00442         if not self.evt.is_set():
00443             self.evt.set()
00444             stop_serving()
00445             raise RuntimeError("timeout reached, test has failed")
00446 
00447         # disable traceback reporting
00448         xmlrpc.server.SimpleXMLRPCServer._send_traceback_header = False

Here is the caller graph for this function:

Definition at line 626 of file test_xmlrpc.py.

00626 
00627     def test_two(self):
00628         p = xmlrpclib.ServerProxy(URL)
00629         #do three requests.
00630         self.assertEqual(p.pow(6,8), 6**8)
00631         self.assertEqual(p.pow(6,8), 6**8)
00632         self.assertEqual(p.pow(6,8), 6**8)
00633         p("close")()
00634 
00635         #they should have all been handled by a single request handler
00636         self.assertEqual(len(self.RequestHandler.myRequests), 1)
00637 
00638         #check that we did at least two (the third may be pending append
00639         #due to thread scheduling)
00640         self.assertGreaterEqual(len(self.RequestHandler.myRequests[-1]), 2)
00641 
00642 
00643 #test special attribute access on the serverproxy, through the __call__
#function.

Here is the call graph for this function:


Member Data Documentation

Definition at line 428 of file test_xmlrpc.py.

Definition at line 420 of file test_xmlrpc.py.

Reimplemented in test.test_xmlrpc.MultiPathServerTestCase.

Definition at line 422 of file test_xmlrpc.py.


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