@@ -629,6 +629,7 @@ def test_two(self):
629629 self .assertEqual (p .pow (6 ,8 ), 6 ** 8 )
630630 self .assertEqual (p .pow (6 ,8 ), 6 ** 8 )
631631 self .assertEqual (p .pow (6 ,8 ), 6 ** 8 )
632+ p ("close" )()
632633
633634 #they should have all been handled by a single request handler
634635 self .assertEqual (len (self .RequestHandler .myRequests ), 1 )
@@ -637,6 +638,7 @@ def test_two(self):
637638 #due to thread scheduling)
638639 self .assertGreaterEqual (len (self .RequestHandler .myRequests [- 1 ]), 2 )
639640
641+
640642#test special attribute access on the serverproxy, through the __call__
641643#function.
642644class KeepaliveServerTestCase2 (BaseKeepaliveServerTestCase ):
@@ -653,19 +655,22 @@ def test_close(self):
653655 self .assertEqual (p .pow (6 ,8 ), 6 ** 8 )
654656 self .assertEqual (p .pow (6 ,8 ), 6 ** 8 )
655657 self .assertEqual (p .pow (6 ,8 ), 6 ** 8 )
658+ p ("close" )()
656659
657660 #they should have all been two request handlers, each having logged at least
658661 #two complete requests
659662 self .assertEqual (len (self .RequestHandler .myRequests ), 2 )
660663 self .assertGreaterEqual (len (self .RequestHandler .myRequests [- 1 ]), 2 )
661664 self .assertGreaterEqual (len (self .RequestHandler .myRequests [- 2 ]), 2 )
662665
666+
663667 def test_transport (self ):
664668 p = xmlrpclib .ServerProxy (URL )
665669 #do some requests with close.
666670 self .assertEqual (p .pow (6 ,8 ), 6 ** 8 )
667671 p ("transport" ).close () #same as above, really.
668672 self .assertEqual (p .pow (6 ,8 ), 6 ** 8 )
673+ p ("close" )()
669674 self .assertEqual (len (self .RequestHandler .myRequests ), 2 )
670675
671676#A test case that verifies that gzip encoding works in both directions
@@ -709,6 +714,7 @@ def test_gzip_request(self):
709714 self .assertEqual (p .pow (6 ,8 ), 6 ** 8 )
710715 b = self .RequestHandler .content_length
711716 self .assertTrue (a > b )
717+ p ("close" )()
712718
713719 def test_bad_gzip_request (self ):
714720 t = self .Transport ()
@@ -719,6 +725,7 @@ def test_bad_gzip_request(self):
719725 re .compile (r"\b400\b" ))
720726 with cm :
721727 p .pow (6 , 8 )
728+ p ("close" )()
722729
723730 def test_gsip_response (self ):
724731 t = self .Transport ()
@@ -729,6 +736,7 @@ def test_gsip_response(self):
729736 a = t .response_length
730737 self .requestHandler .encode_threshold = 0 #always encode
731738 self .assertEqual (p .pow (6 ,8 ), 6 ** 8 )
739+ p ("close" )()
732740 b = t .response_length
733741 self .requestHandler .encode_threshold = old
734742 self .assertTrue (a > b )
0 commit comments