@@ -83,13 +83,15 @@ async def test_get_job_dependencies_with_direction_both(
8383 mocked_user : MockedUser ,
8484):
8585 (
86- (_ , dag2 , _ ),
86+ (dag1 , dag2 , dag3 ),
8787 (task1 , task2 , task3 ),
8888 (_ , spark2 , _ ),
8989 ) = job_dependency_chain
9090 expected_nodes = await enrich_jobs (
9191 [
92+ dag1 ,
9293 dag2 ,
94+ dag3 ,
9395 task1 ,
9496 task2 ,
9597 task3 ,
@@ -107,7 +109,7 @@ async def test_get_job_dependencies_with_direction_both(
107109 assert response .status_code == HTTPStatus .OK , response .json ()
108110 assert response .json () == {
109111 "relations" : {
110- "parents" : jobs_ancestors_to_json ([ task2 , spark2 ] ),
112+ "parents" : jobs_ancestors_to_json (expected_nodes ),
111113 "dependencies" : [
112114 {
113115 "from" : {"kind" : "JOB" , "id" : str (from_id )},
@@ -132,9 +134,13 @@ async def test_get_job_dependencies_with_direction_upstream(
132134 async_session : AsyncSession ,
133135 mocked_user : MockedUser ,
134136):
135- (_ , dag2 , _ ), (task1 , task2 , _ ), (_ , spark2 , _ ) = job_dependency_chain
137+ (
138+ (dag1 , dag2 , _ ),
139+ (task1 , task2 , _ ),
140+ (_ , spark2 , _ ),
141+ ) = job_dependency_chain
136142 expected_nodes = await enrich_jobs (
137- [task1 , dag2 , task2 , spark2 ],
143+ [dag1 , task1 , dag2 , task2 , spark2 ],
138144 async_session ,
139145 )
140146
@@ -147,7 +153,7 @@ async def test_get_job_dependencies_with_direction_upstream(
147153 assert response .status_code == HTTPStatus .OK , response .json ()
148154 assert response .json () == {
149155 "relations" : {
150- "parents" : jobs_ancestors_to_json ([ task2 , spark2 ] ),
156+ "parents" : jobs_ancestors_to_json (expected_nodes ),
151157 "dependencies" : [
152158 {
153159 "from" : {"kind" : "JOB" , "id" : str (task1 .id )},
@@ -166,9 +172,13 @@ async def test_get_job_dependencies_with_direction_downstream(
166172 async_session : AsyncSession ,
167173 mocked_user : MockedUser ,
168174):
169- (_ , dag2 , _ ), (_ , task2 , task3 ), (_ , spark2 , _ ) = job_dependency_chain
175+ (
176+ (_ , dag2 , dag3 ),
177+ (_ , task2 , task3 ),
178+ (_ , spark2 , _ ),
179+ ) = job_dependency_chain
170180 expected_nodes = await enrich_jobs (
171- [dag2 , task2 , spark2 , task3 ],
181+ [dag2 , task2 , spark2 , dag3 , task3 ],
172182 async_session ,
173183 )
174184
@@ -181,7 +191,7 @@ async def test_get_job_dependencies_with_direction_downstream(
181191 assert response .status_code == HTTPStatus .OK , response .json ()
182192 assert response .json () == {
183193 "relations" : {
184- "parents" : jobs_ancestors_to_json ([ task2 , spark2 ] ),
194+ "parents" : jobs_ancestors_to_json (expected_nodes ),
185195 "dependencies" : [
186196 {
187197 "from" : {"kind" : "JOB" , "id" : str (task2 .id )},
0 commit comments