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

Issue 4087004: Fix unittests since unittests don't actually send a request. (Closed)

Created:
10 years, 2 months ago by sosa
Modified:
9 years, 6 months ago
Reviewers:
adlr
CC:
chromium-os-reviews_chromium.org, Nick Sanders
Visibility:
Public.

Description

Fix unittests since unittests don't actually send a request. Change-Id: I1a75bfe698e8b83ddd248e748b512ec4b58d2d7f BUG= TEST=Ran them Committed: http://chrome-svn/viewvc/chromeos?view=rev&revision=5455586

Patch Set 1 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+3 lines, -0 lines) Patch
M autoupdate_unittest.py View 2 chunks +3 lines, -0 lines 0 comments Download

Messages

Total messages: 2 (0 generated)
sosa
The devserver actually takes the base of the url that is sent along with the ...
10 years, 2 months ago (2010-10-26 00:18:00 UTC) #1
adlr
10 years, 2 months ago (2010-10-26 00:24:54 UTC) #2
LGTM

On Mon, Oct 25, 2010 at 5:18 PM, <sosa@chromium.org> wrote:

> Reviewers: adlr,
>
> Message:
> The devserver actually takes the base of the url that is sent along with
> the
> devserver request to create the url to send back.  Since I'm not actually
> sending a request, fill in the cherrypy.request to have this info.
>
> Description:
> Fix unittests since unittest doesn't actually send request.
>
> Change-Id: I1a75bfe698e8b83ddd248e748b512ec4b58d2d7f
>
> BUG=
> TEST=Ran them
>
> Please review this at http://codereview.chromium.org/4087004/show
>
> SVN Base: http://git.chromium.org/git/dev-util.git
>
> Affected files:
>  M autoupdate_unittest.py
>
>
> Index: autoupdate_unittest.py
> diff --git a/autoupdate_unittest.py b/autoupdate_unittest.py
> index
>
6e0a37628667983ee8909a3f1a8fb696b5a7093a..faeb3000f193165c69670733125b2f79cd2f6ab6
> 100755
> --- a/autoupdate_unittest.py
> +++ b/autoupdate_unittest.py
> @@ -6,6 +6,7 @@
>
>  """Unit tests for autoupdate.py."""
>
> +import cherrypy
>  import mox
>  import os
>  import socket
> @@ -47,6 +48,8 @@ class AutoupdateTest(mox.MoxTestBase):
>     self.url = 'http://%s/static/update.gz' % self.hostname
>     self.payload = 'My payload'
>     self.sha256 = 'SHA LA LA'
> +    cherrypy.request.base = 'http://%s' % self.hostname
> +
>
>   def _DummyAutoupdateConstructor(self):
>     """Creates a dummy autoupdater.  Used to avoid using constructor."""
>
>
>

Powered by Google App Engine
This is Rietveld 408576698