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

Unified Diff: client/tests/isolateserver_test.py

Issue 2060983006: luci-py/isolateserver.py: Add archive support when downloading. (Closed) Base URL: https://github.com/luci/luci-py.git@master
Patch Set: Tests now pass. Created 4 years, 6 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
Index: client/tests/isolateserver_test.py
diff --git a/client/tests/isolateserver_test.py b/client/tests/isolateserver_test.py
index 12c8f1c62cf0b305a077ee3a64cda74e16dc1fdf..ef60ec4de2c34ed5517b8d6c7341269a55d39c2b 100755
--- a/client/tests/isolateserver_test.py
+++ b/client/tests/isolateserver_test.py
@@ -724,7 +724,7 @@ class IsolateServerStorageSmokeTest(unittest.TestCase):
# Ensure fetched same data as was pushed.
self.assertEqual(
[i.buffer for i in items],
- [cache.read(i.digest) for i in items])
+ [cache.getfileobj(i.digest).read() for i in items])
def test_push_and_fetch(self):
self.run_push_and_fetch_test('default')
@@ -841,9 +841,9 @@ class IsolateServerDownloadTest(TestCase):
def test_download_isolated(self):
# Test downloading an isolated tree.
actual = {}
- def file_write_mock(key, generator):
- actual[key] = ''.join(generator)
- self.mock(isolateserver, 'file_write', file_write_mock)
+ def putfile_mock(srcfileobj, dstpath, file_mode=None):
+ actual[dstpath] = srcfileobj.read()
+ self.mock(isolateserver, 'putfile', putfile_mock)
self.mock(os, 'makedirs', lambda _: None)
server = 'http://example.com'
files = {
« client/run_isolated.py ('K') | « client/run_isolated.py ('k') | client/utils/fs.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698