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
Collaboration diagram for test.test_xmlrpc.KeepaliveServerTestCase1:
Collaboration graph

List of all members.

Public Member Functions

def test_two
def setUp
def tearDown

Public Attributes


Static Public Attributes

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

Detailed Description

Definition at line 625 of file

Member Function Documentation

Reimplemented from test.test_xmlrpc.BaseServerTestCase.

Definition at line 618 of file

00619     def setUp(self):
00620         #clear request log
00621         self.RequestHandler.myRequests = []
00622         return BaseServerTestCase.setUp(self)
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

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")
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

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")()
00635         #they should have all been handled by a single request handler
00636         self.assertEqual(len(self.RequestHandler.myRequests), 1)
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)
00643 #test special attribute access on the serverproxy, through the __call__

Here is the call graph for this function:

Member Data Documentation

Definition at line 428 of file

Definition at line 420 of file

Reimplemented in test.test_xmlrpc.MultiPathServerTestCase.

Definition at line 422 of file

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