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

Unified Diff: autoupdate_unittest.py

Issue 5611004: Add support for --proxy_port. (Closed) Base URL: ssh://git@gitrw.chromium.org:9222/dev-util.git@master
Patch Set: Created 10 years 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 | « autoupdate.py ('k') | devserver.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: autoupdate_unittest.py
diff --git a/autoupdate_unittest.py b/autoupdate_unittest.py
index 029f1c9302e380661a33fd86ec167e0a781758eb..c1bfcee2a970f42f9fb9dcda5b7de43a673dc055 100755
--- a/autoupdate_unittest.py
+++ b/autoupdate_unittest.py
@@ -124,6 +124,19 @@ class AutoupdateTest(mox.MoxTestBase):
self.assertEqual(au_mock.HandleUpdatePing(test_data), self.payload)
self.mox.VerifyAll()
+ def testChangeUrlPort(self):
+ r = autoupdate._ChangeUrlPort('http://fuzzy:8080/static', 8085)
+ self.assertEqual(r, 'http://fuzzy:8085/static')
+
+ r = autoupdate._ChangeUrlPort('http://fuzzy/static', 8085)
+ self.assertEqual(r, 'http://fuzzy:8085/static')
+
+ r = autoupdate._ChangeUrlPort('ftp://fuzzy/static', 8085)
+ self.assertEqual(r, 'ftp://fuzzy:8085/static')
+
+ r = autoupdate._ChangeUrlPort('ftp://fuzzy', 8085)
+ self.assertEqual(r, 'ftp://fuzzy:8085')
+
if __name__ == '__main__':
unittest.main()
« no previous file with comments | « autoupdate.py ('k') | devserver.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698