Mercurial > bugzilla-dashboard
annotate server.py @ 100:c486d35fad27
added more mocks; black-box now talks to a really simple fake bugzilla 'server'.
author | Atul Varma <avarma@mozilla.com> |
---|---|
date | Tue, 27 Apr 2010 23:06:29 -0700 |
parents | 392fd25a6e21 |
children |
rev | line source |
---|---|
88 | 1 import os |
2 import BaseHTTPServer | |
3 import SimpleHTTPServer | |
4 | |
5 PORT = 8000 | |
6 | |
7 def run(server_class=BaseHTTPServer.HTTPServer, | |
8 handler_class=SimpleHTTPServer.SimpleHTTPRequestHandler, | |
9 port=PORT): | |
10 server_address = ('', port) | |
11 print "Serving files in '%s' on port %d." % (os.getcwd(), port) | |
12 httpd = server_class(server_address, handler_class) | |
13 httpd.serve_forever() | |
14 | |
15 if __name__ == '__main__': | |
16 run() |