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

Unified Diff: tests/gcl_unittest.py

Issue 501106: Get rid of gcl.ReadFile. (Closed)
Patch Set: Created 11 years 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 | « scm.py ('k') | tests/presubmit_unittest.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/gcl_unittest.py
diff --git a/tests/gcl_unittest.py b/tests/gcl_unittest.py
index 6c37bd472aac8f1aba844de8c586e01a287076af..e598312067cfde50aeb16e7fb419a5b81161cda6 100755
--- a/tests/gcl_unittest.py
+++ b/tests/gcl_unittest.py
@@ -19,7 +19,7 @@ class GclTestsBase(SuperMoxTestBase):
self.mox.StubOutWithMock(gcl.SVN, 'CaptureInfo')
self.mox.StubOutWithMock(gcl, 'tempfile')
self.mox.StubOutWithMock(gcl.upload, 'RealMain')
- self.mox.StubOutWithMock(gcl, 'ReadFile')
+ self.mox.StubOutWithMock(gcl.gclient_utils, 'FileRead')
self.mox.StubOutWithMock(gcl.gclient_utils, 'FileWrite')
@@ -38,7 +38,7 @@ class GclUnittest(GclTestsBase):
'GetModifiedFiles', 'GetRepositoryRoot', 'Help', 'Lint',
'LoadChangelistInfoForMultiple', 'MISSING_TEST_MSG', 'Opened',
'OptionallyDoPresubmitChecks', 'PresubmitCL', 'REPOSITORY_ROOT',
- 'ReadFile', 'RunShell', 'RunShellWithReturnCode', 'SVN',
+ 'RunShell', 'RunShellWithReturnCode', 'SVN',
'SendToRietveld', 'TryChange', 'UnknownFiles', 'UploadCL', 'Warn',
'breakpad', 'gclient_utils', 'getpass', 'main', 'os', 'random', 're',
'shutil', 'string', 'subprocess', 'sys', 'tempfile', 'upload',
@@ -185,7 +185,7 @@ class ChangeInfoUnittest(GclTestsBase):
description = ["This is some description.", "force an extra separator."]
gcl.GetChangelistInfoFile('bleh').AndReturn('bleeeh')
gcl.os.path.exists('bleeeh').AndReturn(True)
- gcl.ReadFile('bleeeh').AndReturn(
+ gcl.gclient_utils.FileRead('bleeeh', 'r').AndReturn(
gcl.ChangeInfo._SEPARATOR.join(["42, 53", "G b.cc"] + description))
self.mox.ReplayAll()
@@ -200,7 +200,7 @@ class ChangeInfoUnittest(GclTestsBase):
def testLoadEmpty(self):
gcl.GetChangelistInfoFile('bleh').AndReturn('bleeeh')
gcl.os.path.exists('bleeeh').AndReturn(True)
- gcl.ReadFile('bleeeh').AndReturn(
+ gcl.gclient_utils.FileRead('bleeeh', 'r').AndReturn(
gcl.ChangeInfo._SEPARATOR.join(["", "", ""]))
self.mox.ReplayAll()
« no previous file with comments | « scm.py ('k') | tests/presubmit_unittest.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698