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

Side by Side Diff: tests/gcl_unittest.py

Issue 562031: Fix licensing headers and move most third party code to third_party/... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/tools/depot_tools/
Patch Set: '' Created 10 years, 10 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 #!/usr/bin/python 1 #!/usr/bin/python
2 # Copyright (c) 2009 The Chromium Authors. All rights reserved. 2 # Copyright (c) 2010 The Chromium Authors. All rights reserved.
3 # Use of this source code is governed by a BSD-style license that can be 3 # Use of this source code is governed by a BSD-style license that can be
4 # found in the LICENSE file. 4 # found in the LICENSE file.
5 5
6 """Unit tests for gcl.py.""" 6 """Unit tests for gcl.py."""
7 7
8 # Local imports 8 # Fixes include path.
9 from super_mox import mox, SuperMoxTestBase
10
9 import gcl 11 import gcl
10 from super_mox import mox, SuperMoxTestBase
11 12
12 13
13 class GclTestsBase(SuperMoxTestBase): 14 class GclTestsBase(SuperMoxTestBase):
14 """Setups and tear downs the mocks but doesn't test anything as-is.""" 15 """Setups and tear downs the mocks but doesn't test anything as-is."""
15 def setUp(self): 16 def setUp(self):
16 SuperMoxTestBase.setUp(self) 17 SuperMoxTestBase.setUp(self)
17 self.fake_root_dir = self.RootDir() 18 self.fake_root_dir = self.RootDir()
18 self.mox.StubOutWithMock(gcl, 'RunShell') 19 self.mox.StubOutWithMock(gcl, 'RunShell')
19 self.mox.StubOutWithMock(gcl.SVN, 'CaptureInfo') 20 self.mox.StubOutWithMock(gcl.SVN, 'CaptureInfo')
20 self.mox.StubOutWithMock(gcl.SVN, 'GetCheckoutRoot') 21 self.mox.StubOutWithMock(gcl.SVN, 'GetCheckoutRoot')
(...skipping 323 matching lines...) Expand 10 before | Expand all | Expand 10 after
344 self.mox.ReplayAll() 345 self.mox.ReplayAll()
345 346
346 gcl.UploadCL(change_info, args) 347 gcl.UploadCL(change_info, args)
347 self.assertEquals(change_info.issue, 1) 348 self.assertEquals(change_info.issue, 1)
348 self.assertEquals(change_info.patchset, 2) 349 self.assertEquals(change_info.patchset, 2)
349 350
350 351
351 if __name__ == '__main__': 352 if __name__ == '__main__':
352 import unittest 353 import unittest
353 unittest.main() 354 unittest.main()
OLDNEW
« no previous file with comments | « tests/README.gclient_test ('k') | tests/gclient_scm_test.py » ('j') | tests/gclient_scm_test.py » ('J')

Powered by Google App Engine
This is Rietveld 408576698