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

Unified Diff: tests/git_cl_test.py

Issue 1925873002: Add git_cl recipe module. (Closed) Base URL: https://chromium.googlesource.com/chromium/tools/depot_tools.git@set_desc
Patch Set: Add example.py, make cwd configurable by module. Created 4 years, 8 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: tests/git_cl_test.py
diff --git a/tests/git_cl_test.py b/tests/git_cl_test.py
index 9b506fe20716af4b7314fbebf646783cf425bbea..e246379c97c3e3ee9b52e299a6a67eb8a6c3338b 100755
--- a/tests/git_cl_test.py
+++ b/tests/git_cl_test.py
@@ -21,7 +21,7 @@ import git_common
import git_footers
import subprocess2
-class ChangelistMock():
+class ChangelistMock(object):
# A class variable so we can access it when we don't have access to the
# instance that's being set.
desc = ""
@@ -1434,11 +1434,11 @@ class TestGitCl(TestCase):
self.mock(git_cl.sys, 'stdout', out)
self.mock(git_cl, 'Changelist', ChangelistMock)
- class TMP():
+ class StdinMock():
def splitlines(self):
return ['hihi']
- self.mock(git_cl.sys, 'stdin', TMP())
+ self.mock(git_cl.sys, 'stdin', StdinMock())
self.assertEqual(0, git_cl.main(['description', '-n', 'hihi']))
self.assertEqual('hihi', ChangelistMock.desc)
@@ -1448,11 +1448,11 @@ class TestGitCl(TestCase):
self.mock(git_cl.sys, 'stdout', out)
self.mock(git_cl, 'Changelist', ChangelistMock)
- class TMP():
+ class StdinMock(object):
def splitlines(self):
return ['hi', 'there']
- self.mock(git_cl.sys, 'stdin', TMP())
+ self.mock(git_cl.sys, 'stdin', StdinMock())
self.assertEqual(0, git_cl.main(['description', '-n', '-']))
self.assertEqual('hi\nthere', ChangelistMock.desc)
« recipe_modules/git_cl/config.py ('K') | « recipe_modules/git_cl/example.expected/basic.json ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698