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

Unified Diff: tests/gcl_unittest.py

Issue 3171026: Disable the use of -s or --server with gcl upload. (Closed)
Patch Set: Created 10 years, 4 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
« 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 c160aa178dd81277f0799ec315a65a635f29a4a0..8da6c1e84eee0484bbe255bddc88a26f227573dd 100755
--- a/tests/gcl_unittest.py
+++ b/tests/gcl_unittest.py
@@ -325,6 +325,22 @@ class CMDuploadUnittest(GclTestsBase):
self.assertEquals(change_info.issue, 1)
self.assertEquals(change_info.patchset, 2)
+ def testNoServer(self):
+ self.mox.StubOutWithMock(gcl.sys, 'stderr')
+ gcl.sys.stderr.write(
+ 'Don\'t use the -s flag, fix codereview.settings instead')
+ gcl.sys.stderr.write('\n')
+ gcl.GetRepositoryRoot().AndReturn(self.fake_root_dir)
+ gcl.ChangeInfo.Load('naame', self.fake_root_dir, True, True
+ ).AndReturn(1)
+ self.mox.ReplayAll()
+
+ try:
+ gcl.CMDupload(['naame', '-s', 'foo'])
+ self.fail()
+ except SystemExit:
+ pass
+
if __name__ == '__main__':
import unittest
« 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