Back to index

python3.2  3.2.2
Classes | Functions | Variables
test.test_httpservers Namespace Reference

Classes

class  NoLogRequestHandler
class  TestServerThread
class  BaseTestCase
class  BaseHTTPServerTestCase
class  SimpleHTTPServerTestCase
class  CGIHTTPServerTestCase
class  SocketlessRequestHandler
class  RejectingSocketlessRequestHandler
class  BaseHTTPRequestHandlerTestCase
class  SimpleHTTPRequestHandlerTestCase

Functions

def test_main

Variables

tuple threading = support.import_module('threading')
string cgi_file1
string cgi_file2

Detailed Description

Unittests for the various HTTPServer modules.

Written by Cody A.W. Somerville <cody-somerville@ubuntu.com>,
Josip Dzolonga, and Michael Otteneder for the 2007/08 GHOP contest.

Function Documentation

def test.test_httpservers.test_main (   verbose = None)

Definition at line 621 of file test_httpservers.py.

00621 
00622 def test_main(verbose=None):
00623     cwd = os.getcwd()
00624     try:
00625         support.run_unittest(
00626             BaseHTTPRequestHandlerTestCase,
00627             BaseHTTPServerTestCase,
00628             SimpleHTTPServerTestCase,
00629             CGIHTTPServerTestCase,
00630             SimpleHTTPRequestHandlerTestCase,
00631         )
00632     finally:
00633         os.chdir(cwd)


Variable Documentation

Initial value:
00001 """\
00002 #!%s
00003 
00004 print("Content-type: text/html")
00005 print()
00006 print("Hello World")
00007 """

Definition at line 288 of file test_httpservers.py.

Initial value:
00001 """\
00002 #!%s
00003 import cgi
00004 
00005 print("Content-type: text/html")
00006 print()
00007 
00008 form = cgi.FieldStorage()
00009 print("%%s, %%s, %%s" %% (form.getfirst("spam"), form.getfirst("eggs"),
00010                           form.getfirst("bacon")))
00011 """

Definition at line 296 of file test_httpservers.py.

Definition at line 23 of file test_httpservers.py.