예제 #1
0
 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)
예제 #2
0
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()
예제 #3
0
 def test_build_url5(self):
     url = 'http://localhost/'
     builder = http.UriBuilder(url)
     ret = builder.build()
     self.assertEqual('http://localhost:80/', ret)
예제 #4
0
def _build_url_for_test(paths):
    builder = http.UriBuilder('http://localhost:7070')
    for p in paths:
        builder.add_path(p)
    return builder.build()