def test_format_sync_url_escapes(self): # The base_url should not get munged (we assume it is already a # properly formed URL), but the replica-uid should get properly escaped target = c_backend_wrapper.create_http_sync_target( "http://host/base%2Ctest/") self.assertEqual("http://host/base%2Ctest/sync-from/replica%2Cuid", c_backend_wrapper._format_sync_url(target, "replica,uid"))
def test_format_sync_url_escapes(self): # The base_url should not get munged (we assume it is already a # properly formed URL), but the replica-uid should get properly escaped target = c_backend_wrapper.create_http_sync_target( "http://host/base%2Ctest/") self.assertEqual( "http://host/base%2Ctest/sync-from/replica%2Cuid", c_backend_wrapper._format_sync_url(target, "replica,uid"))
def test_format_sync_url(self): target = c_backend_wrapper.create_http_sync_target("http://base_url") self.assertEqual("http://base_url/sync-from/replica-uid", c_backend_wrapper._format_sync_url(target, "replica-uid"))
def test_format_sync_url(self): target = c_backend_wrapper.create_http_sync_target("http://base_url") self.assertEqual( "http://base_url/sync-from/replica-uid", c_backend_wrapper._format_sync_url(target, "replica-uid"))