Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2026-04-09 07:58:21

0001 #!/usr/bin/env python
0002 #
0003 # Licensed under the Apache License, Version 2.0 (the "License");
0004 # You may not use this file except in compliance with the License.
0005 # You may obtain a copy of the License at
0006 # http://www.apache.org/licenses/LICENSE-2.0OA
0007 #
0008 # Authors:
0009 # - Wen Guan, <wen.guan@cern.ch>, 2020
0010 
0011 
0012 """
0013 Test cacher.
0014 """
0015 
0016 import os
0017 
0018 from idds.client.client import Client
0019 from idds.common.utils import get_rest_host
0020 
0021 
0022 full_name = os.path.abspath(__file__)
0023 
0024 host = get_rest_host()
0025 
0026 client = Client(host=host)
0027 client.upload(full_name)
0028 client.download(os.path.join('/tmp', os.path.basename(full_name)))
0029 
0030 full_name = '/bin/hostname'
0031 client.upload(full_name)
0032 client.download(os.path.join('/tmp', os.path.basename(full_name)))