@@ -49,25 +49,22 @@ def inner(previous_graphs=None):
4949 )
5050
5151 # Only the parameters from the first previous graph is downloaded.
52- responses . add (
53- method = "GET" ,
54- url = f"{ tc_url } /api/queue/v1/task/{ list (previous_graphs .keys ())[0 ]} /artifacts/public%2Fparameters.yml" ,
55- json = parameters ,
56- )
52+ # get_artifact does a two-step fetch: getLatestArtifact returns
53+ # {"url": url}, then the content is fetched from that url.
54+ url = f"{ tc_url } /api/queue/v1/task/{ list (previous_graphs .keys ())[0 ]} /artifacts/public%2Fparameters.yml"
55+ responses . add ( method = "GET" , url = url , json = { "url" : url })
56+ responses . add ( method = "GET" , url = url , json = parameters )
5757
5858 tid = count (0 )
5959 for decision_id , full_task_graph in previous_graphs .items ():
60- responses .add (
61- method = "GET" ,
62- url = f"{ tc_url } /api/queue/v1/task/{ decision_id } /artifacts/public%2Ffull-task-graph.json" ,
63- json = full_task_graph .to_json (),
64- )
60+ url = f"{ tc_url } /api/queue/v1/task/{ decision_id } /artifacts/public%2Ffull-task-graph.json"
61+ responses .add (method = "GET" , url = url , json = {"url" : url })
62+ responses .add (method = "GET" , url = url , json = full_task_graph .to_json ())
63+
6564 label_to_taskid = {label : int (next (tid )) for label in full_task_graph .tasks }
66- responses .add (
67- method = "GET" ,
68- url = f"{ tc_url } /api/queue/v1/task/{ decision_id } /artifacts/public%2Flabel-to-taskid.json" ,
69- json = label_to_taskid ,
70- )
65+ url = f"{ tc_url } /api/queue/v1/task/{ decision_id } /artifacts/public%2Flabel-to-taskid.json"
66+ responses .add (method = "GET" , url = url , json = {"url" : url })
67+ responses .add (method = "GET" , url = url , json = label_to_taskid )
7168
7269 return inner
7370
0 commit comments