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

Side by Side Diff: tests/gclient_scm_test.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 unified diff | Download patch
« no previous file with comments | « scm.py ('k') | tests/scm_unittest.py » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 #!/usr/bin/python 1 #!/usr/bin/python
2 # 2 #
3 # Copyright 2008-2009 Google Inc. All Rights Reserved. 3 # Copyright 2008-2009 Google Inc. All Rights Reserved.
4 # 4 #
5 # Licensed under the Apache License, Version 2.0 (the "License"); 5 # Licensed under the Apache License, Version 2.0 (the "License");
6 # you may not use this file except in compliance with the License. 6 # you may not use this file except in compliance with the License.
7 # You may obtain a copy of the License at 7 # You may obtain a copy of the License at
8 # 8 #
9 # http://www.apache.org/licenses/LICENSE-2.0 9 # http://www.apache.org/licenses/LICENSE-2.0
10 # 10 #
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
58 def setUp(self): 58 def setUp(self):
59 BaseTestCase.setUp(self) 59 BaseTestCase.setUp(self)
60 self.root_dir = self.Dir() 60 self.root_dir = self.Dir()
61 self.args = self.Args() 61 self.args = self.Args()
62 self.url = self.Url() 62 self.url = self.Url()
63 self.relpath = 'asf' 63 self.relpath = 'asf'
64 64
65 def testDir(self): 65 def testDir(self):
66 members = [ 66 members = [
67 'COMMAND', 'Capture', 'CaptureHeadRevision', 'CaptureInfo', 67 'COMMAND', 'Capture', 'CaptureHeadRevision', 'CaptureInfo',
68 'CaptureStatus', 'DiffItem', 'FullUrlForRelativeUrl', 'GetFileProperty', 68 'CaptureStatus', 'DiffItem', 'FullUrlForRelativeUrl', 'GetEmail',
69 'IsMoved', 'Run', 'RunAndFilterOutput', 'RunAndGetFileList', 69 'GetFileProperty', 'IsMoved', 'ReadEntries', 'ReadSimpleAuth', 'Run',
70 'RunAndFilterOutput', 'RunAndGetFileList',
70 'RunCommand', 'cleanup', 'diff', 'export', 'pack', 'relpath', 'revert', 71 'RunCommand', 'cleanup', 'diff', 'export', 'pack', 'relpath', 'revert',
71 'revinfo', 'runhooks', 'scm_name', 'status', 'update', 'url', 72 'revinfo', 'runhooks', 'scm_name', 'status', 'update', 'url',
72 ] 73 ]
73 74
74 # If you add a member, be sure to add the relevant test! 75 # If you add a member, be sure to add the relevant test!
75 self.compareMembers(self._scm_wrapper(), members) 76 self.compareMembers(self._scm_wrapper(), members)
76 77
77 def testUnsupportedSCM(self): 78 def testUnsupportedSCM(self):
78 args = [self.url, self.root_dir, self.relpath] 79 args = [self.url, self.root_dir, self.relpath]
79 kwargs = {'scm_name' : 'foo'} 80 kwargs = {'scm_name' : 'foo'}
(...skipping 280 matching lines...) Expand 10 before | Expand all | Expand 10 after
360 self.enabled = self.CreateGitRepo(self.sample_git_import, self.base_path) 361 self.enabled = self.CreateGitRepo(self.sample_git_import, self.base_path)
361 SuperMoxBaseTestBase.setUp(self) 362 SuperMoxBaseTestBase.setUp(self)
362 363
363 def tearDown(self): 364 def tearDown(self):
364 SuperMoxBaseTestBase.tearDown(self) 365 SuperMoxBaseTestBase.tearDown(self)
365 shutil.rmtree(self.root_dir) 366 shutil.rmtree(self.root_dir)
366 367
367 def testDir(self): 368 def testDir(self):
368 members = [ 369 members = [
369 'COMMAND', 'Capture', 'CaptureStatus', 'FullUrlForRelativeUrl', 370 'COMMAND', 'Capture', 'CaptureStatus', 'FullUrlForRelativeUrl',
371 'GetEmail',
370 'RunCommand', 'cleanup', 'diff', 'export', 'relpath', 'revert', 372 'RunCommand', 'cleanup', 'diff', 'export', 'relpath', 'revert',
371 'revinfo', 'runhooks', 'scm_name', 'status', 'update', 'url', 373 'revinfo', 'runhooks', 'scm_name', 'status', 'update', 'url',
372 ] 374 ]
373 375
374 # If you add a member, be sure to add the relevant test! 376 # If you add a member, be sure to add the relevant test!
375 self.compareMembers(gclient_scm.CreateSCM(url=self.url), members) 377 self.compareMembers(gclient_scm.CreateSCM(url=self.url), members)
376 378
377 def testRevertMissing(self): 379 def testRevertMissing(self):
378 if not self.enabled: 380 if not self.enabled:
379 return 381 return
(...skipping 132 matching lines...) Expand 10 before | Expand all | Expand 10 after
512 relpath=self.relpath) 514 relpath=self.relpath)
513 rev_info = scm.revinfo(options, (), None) 515 rev_info = scm.revinfo(options, (), None)
514 self.assertEquals(rev_info, '069c602044c5388d2d15c3f875b057c852003458') 516 self.assertEquals(rev_info, '069c602044c5388d2d15c3f875b057c852003458')
515 517
516 518
517 if __name__ == '__main__': 519 if __name__ == '__main__':
518 import unittest 520 import unittest
519 unittest.main() 521 unittest.main()
520 522
521 # vim: ts=2:sw=2:tw=80:et: 523 # vim: ts=2:sw=2:tw=80:et:
OLDNEW
« no previous file with comments | « scm.py ('k') | tests/scm_unittest.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698