Fix two unittests by testing the queue mechanism rather than verifying mocks.
As we can't follow mocks across processes, I'm modifying the downloader_unittests
that tests background to only test the output of the queues rather than checking
of Download/Staging are called in the background process. As that componenet
is already tested in the testDownloaderSerially test, we only need to test
that the background process is communicating correctly back to the main process
by placing Success in the Queues.
BUG=chromium-os:29936
TEST=Ran them.
Change-Id: I893a3712f16e994f12d7e15b409dc65b35cdc821
Reviewed-on: https://gerrit.chromium.org/gerrit/26485
Tested-by: Chris Sosa <sosa@chromium.org>
Reviewed-by: Chris Masone <cmasone@chromium.org>
Commit-Ready: Chris Sosa <sosa@chromium.org>
diff --git a/downloader.py b/downloader.py
index 624aa4a..beb57c2 100755
--- a/downloader.py
+++ b/downloader.py
@@ -96,7 +96,7 @@
# Replace '/' with '_' in rel_path because it may contain multiple levels
# which would not be qualified as part of the suffix.
self._staging_dir = tempfile.mkdtemp(suffix='_'.join(
- [rel_path.replace('/','_'), short_build]))
+ [rel_path.replace('/', '_'), short_build]))
cherrypy.log('Gathering download requirements %s' % archive_url,
self._LOG_TAG)
artifacts = self.GatherArtifactDownloads(
@@ -236,7 +236,7 @@
# Replace '/' with '_' in rel_path because it may contain multiple levels
# which would not be qualified as part of the suffix.
self._staging_dir = tempfile.mkdtemp(suffix='_'.join(
- [rel_path.replace('/','_'), short_build]))
+ [rel_path.replace('/', '_'), short_build]))
cherrypy.log('Downloading debug symbols from %s' % archive_url,
self._LOG_TAG)