~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/HTTPTestUtil.py

  • Committer: Robert Collins
  • Date: 2005-11-28 05:13:41 UTC
  • mfrom: (1185.33.54 merge-recovered)
  • Revision ID: robertc@robertcollins.net-20051128051341-059936f2f29a12c8
Merge from Martin. Adjust check to work with HTTP again.

Show diffs side-by-side

added added

removed removed

Lines of Context:
15
15
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
16
16
 
17
17
import BaseHTTPServer, SimpleHTTPServer, socket, errno, time
18
 
from bzrlib.selftest import TestCaseInTempDir
 
18
from bzrlib.tests import TestCaseInTempDir
19
19
 
20
20
 
21
21
class WebserverNotAvailable(Exception):
27
27
 
28
28
class TestingHTTPRequestHandler(SimpleHTTPServer.SimpleHTTPRequestHandler):
29
29
    def log_message(self, format, *args):
30
 
        self.server.test_case.log("webserver - %s - - [%s] %s" %
31
 
                                  (self.address_string(),
32
 
                                   self.log_date_time_string(),
33
 
                                   format%args))
 
30
        self.server.test_case.log("webserver - %s - - [%s] %s",
 
31
                                  self.address_string(),
 
32
                                  self.log_date_time_string(),
 
33
                                  format%args)
34
34
 
35
35
    def handle_one_request(self):
36
36
        """Handle a single HTTP request.