Move to using cherrypy.

This moves our devserver from using web to use cherrypy.
Cherrypy is more robust and provides byte range continuations than web.py.

Change-Id: I674f213a6c8c5de68e9ba78d3e97b682c016803f

BUG=7395
TEST=Ran with latest, forced, and archive_dir.  Tests for factory are ongoing.

Review URL: http://codereview.chromium.org/3708004
diff --git a/autoupdate_unittest.py b/autoupdate_unittest.py
index 688695e..6e0a376 100755
--- a/autoupdate_unittest.py
+++ b/autoupdate_unittest.py
@@ -8,8 +8,8 @@
 
 import mox
 import os
+import socket
 import unittest
-import web
 
 import autoupdate
 
@@ -28,12 +28,13 @@
     self.mox.StubOutWithMock(autoupdate.Autoupdate, '_GetSHA256')
     self.mox.StubOutWithMock(autoupdate.Autoupdate, 'GetUpdatePayload')
     self.mox.StubOutWithMock(autoupdate.Autoupdate, '_GetLatestImageDir')
+    self.port = 8080
     self.test_board = 'test-board'
     self.build_root = '/src_path/build/images'
     self.latest_dir = '12345_af_12-a1'
     self.latest_verision = '12345_af_12'
     self.static_image_dir = '/tmp/static-dir/'
-    self.hostname = 'fake-host'
+    self.hostname = '%s:%s' % (socket.gethostname(), self.port)
     self.test_dict = { 'client': 'ChromeOSUpdateEngine-1.0',
                        'version': 'ForcedUpdate',
                        'track': 'unused_var',
@@ -50,11 +51,9 @@
   def _DummyAutoupdateConstructor(self):
     """Creates a dummy autoupdater.  Used to avoid using constructor."""
     dummy = autoupdate.Autoupdate(root_dir=None,
-                                  static_dir=self.static_image_dir)
+                                  static_dir=self.static_image_dir,
+                                  port=self.port)
     dummy.client_prefix = 'ChromeOSUpdateEngine'
-
-    # Set to fool the web.
-    web.ctx.host = self.hostname
     return dummy
 
   def testGenerateLatestUpdateImageWithForced(self):