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

Side by Side Diff: tests/gclient_utils_test.py

Issue 197073007: Make rietveld test work on port 10000. (Closed) Base URL: https://chromium.googlesource.com/chromium/tools/depot_tools.git@master
Patch Set: Also fix tests. Created 6 years, 9 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
« no previous file with comments | « tests/basic.sh ('k') | tests/owners.sh » ('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/env python 1 #!/usr/bin/env python
2 # Copyright (c) 2012 The Chromium Authors. All rights reserved. 2 # Copyright (c) 2012 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 import os 6 import os
7 import StringIO 7 import StringIO
8 import sys 8 import sys
9 9
10 sys.path.insert(0, os.path.dirname(os.path.dirname(os.path.abspath(__file__)))) 10 sys.path.insert(0, os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
(...skipping 146 matching lines...) Expand 10 before | Expand all | Expand 10 after
157 values = [ 157 values = [
158 ['', ''], 158 ['', ''],
159 [None, None], 159 [None, None],
160 ['foo', 'https://foo'], 160 ['foo', 'https://foo'],
161 ['http://foo', 'https://foo'], 161 ['http://foo', 'https://foo'],
162 ['foo/', 'https://foo/'], 162 ['foo/', 'https://foo/'],
163 ['ssh-svn://foo', 'ssh-svn://foo'], 163 ['ssh-svn://foo', 'ssh-svn://foo'],
164 ['ssh-svn://foo/bar/', 'ssh-svn://foo/bar/'], 164 ['ssh-svn://foo/bar/', 'ssh-svn://foo/bar/'],
165 ['codereview.chromium.org', 'https://codereview.chromium.org'], 165 ['codereview.chromium.org', 'https://codereview.chromium.org'],
166 ['codereview.chromium.org/', 'https://codereview.chromium.org/'], 166 ['codereview.chromium.org/', 'https://codereview.chromium.org/'],
167 ['http://foo:8080', 'http://foo:8080'], 167 ['http://foo:10000', 'http://foo:10000'],
168 ['http://foo:8080/bar', 'http://foo:8080/bar'], 168 ['http://foo:10000/bar', 'http://foo:10000/bar'],
169 ['foo:8080', 'http://foo:8080'], 169 ['foo:10000', 'http://foo:10000'],
170 ['foo:', 'https://foo:'], 170 ['foo:', 'https://foo:'],
171 ] 171 ]
172 for content, expected in values: 172 for content, expected in values:
173 self.assertEquals( 173 self.assertEquals(
174 expected, gclient_utils.UpgradeToHttps(content)) 174 expected, gclient_utils.UpgradeToHttps(content))
175 175
176 def testParseCodereviewSettingsContent(self): 176 def testParseCodereviewSettingsContent(self):
177 values = [ 177 values = [
178 ['# bleh\n', {}], 178 ['# bleh\n', {}],
179 ['\t# foo : bar\n', {}], 179 ['\t# foo : bar\n', {}],
(...skipping 12 matching lines...) Expand all
192 for content, expected in values: 192 for content, expected in values:
193 self.assertEquals( 193 self.assertEquals(
194 expected, gclient_utils.ParseCodereviewSettingsContent(content)) 194 expected, gclient_utils.ParseCodereviewSettingsContent(content))
195 195
196 196
197 if __name__ == '__main__': 197 if __name__ == '__main__':
198 import unittest 198 import unittest
199 unittest.main() 199 unittest.main()
200 200
201 # vim: ts=2:sw=2:tw=80:et: 201 # vim: ts=2:sw=2:tw=80:et:
OLDNEW
« no previous file with comments | « tests/basic.sh ('k') | tests/owners.sh » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698