File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 33
44from pathlib import Path
55
6+ import erdpy .config
67from erdpy import workstation
78from erdpy .testnet import config
89
@@ -60,7 +61,14 @@ def test_init():
6061 'testnet' : '/some/where/mytestnet' ,
6162 }
6263
64+ sdk_folder = workstation .get_tools_folder ()
65+ node_folder = erdpy .config .get_dependency_parent_directory ('elrond_go' )
66+ (node_folder / 'v1.2.3' ).mkdir (parents = True , exist_ok = True )
67+
68+ proxy_folder = erdpy .config .get_dependency_parent_directory ('elrond_proxy_go' )
69+ (proxy_folder / 'v2.3.4' ).mkdir (parents = True , exist_ok = True )
70+
6371 testnet_config = config .TestnetConfiguration (data )
64- assert testnet_config .folders ["elrond_go" ] == workstation . get_tools_folder () / "bar"
65- assert testnet_config .folders ["elrond_proxy_go" ] == workstation . get_tools_folder () / "foobar"
72+ assert testnet_config .folders ["elrond_go" ] == sdk_folder / "bar"
73+ assert testnet_config .folders ["elrond_proxy_go" ] == sdk_folder / "foobar"
6674 assert testnet_config .folders ["testnet" ] == Path ("/some/where/mytestnet" )
Original file line number Diff line number Diff line change @@ -233,9 +233,15 @@ def query_latest_release_tag(repo: str) -> str:
233233 repository. The repository must be of the form 'organisation/project'.
234234 """
235235 url = f'https://api.github.com/repos/{ repo } /releases/latest'
236+
236237 github_api_token = erdpy .config .get_value ('github_api_token' )
237- response = requests .get (url , auth = github_api_token )
238+ headers = dict ()
239+ if github_api_token != '' :
240+ headers ['Authorization' ] = f'token { github_api_token } '
241+
242+ response = requests .get (url , headers = headers )
238243 response .raise_for_status ()
244+
239245 latest_release_tag = str (response .json ()['tag_name' ])
240246 return latest_release_tag
241247
You can’t perform that action at this time.
0 commit comments