| 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()
|
|
|