File tree Expand file tree Collapse file tree 1 file changed +15
-0
lines changed
diracx-routers/tests/jobs Expand file tree Collapse file tree 1 file changed +15
-0
lines changed Original file line number Diff line number Diff line change @@ -395,6 +395,21 @@ def test_insert_and_reschedule(normal_user_client: TestClient):
395395 }
396396
397397
398+ def test_insert_and_get_jdl (normal_user_client : TestClient ):
399+ job_definitions = [TEST_JDL ] * 10
400+ r = normal_user_client .post ("/api/jobs/jdl" , json = job_definitions )
401+ assert r .status_code == 200 , r .json ()
402+ assert len (r .json ()) == len (job_definitions )
403+
404+ submitted_job_ids = set (job_dict ["JobID" ] for job_dict in r .json ())
405+
406+ for id in submitted_job_ids :
407+ # Get the JDL
408+ r = normal_user_client .get (f"/api/jobs/{ id } /jdl" )
409+ assert r .status_code == 200 , r .json ()
410+ # Won't fetch it, submission logic alters the JDL
411+
412+
398413# test edge case for rescheduling
399414
400415
You can’t perform that action at this time.
0 commit comments