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

Unified Diff: tests/scm_unittest.py

Issue 399070: Add scm.*.GetEmail() to retrieve the user email. Use this email for try job emails. (Closed)
Patch Set: Use CaptureInfo() Created 11 years, 1 month 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 | « tests/gclient_scm_test.py ('k') | tests/trychange_unittest.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/scm_unittest.py
diff --git a/tests/scm_unittest.py b/tests/scm_unittest.py
index 4dbb9296534a745c1eeaaaeaa08cc4aa2649f461..5e1c09fbccc005d817fae9f00d80ec34e17e4346 100755
--- a/tests/scm_unittest.py
+++ b/tests/scm_unittest.py
@@ -106,6 +106,7 @@ from :3
self.relpath = '.'
self.base_path = scm.os.path.join(self.root_dir, self.relpath)
self.enabled = self.CreateGitRepo(self.sample_git_import, self.base_path)
+ self.fake_root = self.Dir()
def tearDown(self):
shutil.rmtree(self.root_dir)
@@ -114,11 +115,17 @@ from :3
def testMembersChanged(self):
self.mox.ReplayAll()
members = [
- 'COMMAND', 'Capture', 'CaptureStatus',
+ 'COMMAND', 'Capture', 'CaptureStatus', 'GetEmail',
]
# If this test fails, you should add the relevant test.
self.compareMembers(scm.GIT, members)
+ def testGetEmail(self):
+ self.mox.StubOutWithMock(scm.GIT, 'Capture')
+ scm.GIT.Capture(['config', 'user.email'], self.fake_root).AndReturn('mini@me.com')
+ self.mox.ReplayAll()
+ self.assertEqual(scm.GIT.GetEmail(self.fake_root), 'mini@me.com')
+
class SVNTestCase(BaseSCMTestCase):
def setUp(self):
@@ -132,8 +139,9 @@ class SVNTestCase(BaseSCMTestCase):
self.mox.ReplayAll()
members = [
'COMMAND', 'Capture', 'CaptureHeadRevision', 'CaptureInfo',
- 'CaptureStatus', 'DiffItem', 'GetFileProperty', 'IsMoved', 'Run',
- 'RunAndFilterOutput', 'RunAndGetFileList',
+ 'CaptureStatus', 'DiffItem', 'GetEmail', 'GetFileProperty', 'IsMoved',
+ 'ReadEntries', 'ReadSimpleAuth', 'Run', 'RunAndFilterOutput',
+ 'RunAndGetFileList',
]
# If this test fails, you should add the relevant test.
self.compareMembers(scm.SVN, members)
« no previous file with comments | « tests/gclient_scm_test.py ('k') | tests/trychange_unittest.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698