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

Unified Diff: tests/gcl_unittest.py

Issue 502066: Remove gcl.WriteFile (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 | « gcl.py ('k') | no next file » | 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 21b2a4e5d4e532d82949ac96ba14ed4eaf5dc926..6c37bd472aac8f1aba844de8c586e01a287076af 100755
--- a/tests/gcl_unittest.py
+++ b/tests/gcl_unittest.py
@@ -19,9 +19,8 @@ class GclTestsBase(SuperMoxTestBase):
self.mox.StubOutWithMock(gcl.SVN, 'CaptureInfo')
self.mox.StubOutWithMock(gcl, 'tempfile')
self.mox.StubOutWithMock(gcl.upload, 'RealMain')
- # These are not tested.
self.mox.StubOutWithMock(gcl, 'ReadFile')
- self.mox.StubOutWithMock(gcl, 'WriteFile')
+ self.mox.StubOutWithMock(gcl.gclient_utils, 'FileWrite')
class GclUnittest(GclTestsBase):
@@ -41,7 +40,6 @@ class GclUnittest(GclTestsBase):
'OptionallyDoPresubmitChecks', 'PresubmitCL', 'REPOSITORY_ROOT',
'ReadFile', 'RunShell', 'RunShellWithReturnCode', 'SVN',
'SendToRietveld', 'TryChange', 'UnknownFiles', 'UploadCL', 'Warn',
- 'WriteFile',
'breakpad', 'gclient_utils', 'getpass', 'main', 'os', 'random', 're',
'shutil', 'string', 'subprocess', 'sys', 'tempfile', 'upload',
'urllib2',
@@ -215,8 +213,9 @@ class ChangeInfoUnittest(GclTestsBase):
def testSaveEmpty(self):
gcl.GetChangelistInfoFile('').AndReturn('foo')
- gcl.WriteFile('foo', gcl.ChangeInfo._SEPARATOR.join(['0, 0, clean', '',
- '']))
+ gcl.gclient_utils.FileWrite(
+ 'foo',
+ gcl.ChangeInfo._SEPARATOR.join(['0, 0, clean', '', '']))
self.mox.ReplayAll()
change_info = gcl.ChangeInfo('', 0, 0, '', None, self.fake_root_dir)
@@ -224,8 +223,9 @@ class ChangeInfoUnittest(GclTestsBase):
def testSaveDirty(self):
gcl.GetChangelistInfoFile('').AndReturn('foo')
- gcl.WriteFile('foo', gcl.ChangeInfo._SEPARATOR.join(['0, 0, dirty', '',
- '']))
+ gcl.gclient_utils.FileWrite(
+ 'foo',
+ gcl.ChangeInfo._SEPARATOR.join(['0, 0, dirty', '', '']))
self.mox.ReplayAll()
change_info = gcl.ChangeInfo('', 0, 0, '', None, self.fake_root_dir,
« no previous file with comments | « gcl.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698