Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1805)

Unified Diff: autoupdate_unittest.py

Issue 3708004: Move dev server to use cherrypy. (Closed) Base URL: http://git.chromium.org/git/dev-util.git
Patch Set: last Created 10 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « autoupdate.py ('k') | buildutil.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: autoupdate_unittest.py
diff --git a/autoupdate_unittest.py b/autoupdate_unittest.py
index 688695e9170378461f11f57e3fbcfb150d0924d1..6e0a37628667983ee8909a3f1a8fb696b5a7093a 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 @@ class AutoupdateTest(mox.MoxTestBase):
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 @@ class AutoupdateTest(mox.MoxTestBase):
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):
« no previous file with comments | « autoupdate.py ('k') | buildutil.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698