def test_build_url4(self): url = 'http://localhost/' builder = http.UriBuilder(url) builder.add_path('/connect') builder.add_path('/vm') ret = builder.build() self.assertEqual('http://localhost:80/connect/vm/', ret)
def _build_url_for_test(paths): builder = http.UriBuilder('http://localhost:%s' % SftpBackupStorageAgent.PORT) for p in paths: builder.add_path(p) return builder.build()
def test_build_url5(self): url = 'http://localhost/' builder = http.UriBuilder(url) ret = builder.build() self.assertEqual('http://localhost:80/', ret)
def _build_url_for_test(paths): builder = http.UriBuilder('http://localhost:7070') for p in paths: builder.add_path(p) return builder.build()