|
9 | 9 | from data_rentgen.db.models.run import Run |
10 | 10 | from data_rentgen.utils.uuid import generate_new_uuid |
11 | 11 | from tests.fixtures.mocks import MockedUser |
12 | | -from tests.test_server.utils.convert_to_json import run_to_json |
| 12 | +from tests.test_server.utils.convert_to_json import job_to_json, run_to_json |
13 | 13 | from tests.test_server.utils.enrich import enrich_runs |
14 | 14 |
|
15 | 15 | pytestmark = [pytest.mark.server, pytest.mark.asyncio] |
@@ -119,6 +119,7 @@ async def test_get_runs_with_since( |
119 | 119 | { |
120 | 120 | "id": str(run.id), |
121 | 121 | "data": run_to_json(run), |
| 122 | + "job": job_to_json(run.job), |
122 | 123 | "statistics": { |
123 | 124 | "inputs": { |
124 | 125 | "total_datasets": 0, |
@@ -179,6 +180,7 @@ async def test_get_runs_with_until( |
179 | 180 | { |
180 | 181 | "id": str(run.id), |
181 | 182 | "data": run_to_json(run), |
| 183 | + "job": job_to_json(run.job), |
182 | 184 | "statistics": { |
183 | 185 | "inputs": { |
184 | 186 | "total_datasets": 0, |
@@ -243,6 +245,7 @@ async def test_get_runs_with_job_type( |
243 | 245 | { |
244 | 246 | "id": str(run.id), |
245 | 247 | "data": run_to_json(run), |
| 248 | + "job": job_to_json(run.job), |
246 | 249 | "statistics": { |
247 | 250 | "inputs": { |
248 | 251 | "total_datasets": 0, |
@@ -292,6 +295,7 @@ async def test_get_runs_with_job_type( |
292 | 295 | { |
293 | 296 | "id": str(run.id), |
294 | 297 | "data": run_to_json(run), |
| 298 | + "job": job_to_json(run.job), |
295 | 299 | "statistics": { |
296 | 300 | "inputs": { |
297 | 301 | "total_datasets": 0, |
@@ -356,6 +360,7 @@ async def test_get_runs_with_status( |
356 | 360 | { |
357 | 361 | "id": str(run.id), |
358 | 362 | "data": run_to_json(run), |
| 363 | + "job": job_to_json(run.job), |
359 | 364 | "statistics": { |
360 | 365 | "inputs": { |
361 | 366 | "total_datasets": 0, |
@@ -404,6 +409,7 @@ async def test_get_runs_with_status( |
404 | 409 | { |
405 | 410 | "id": str(run.id), |
406 | 411 | "data": run_to_json(run), |
| 412 | + "job": job_to_json(run.job), |
407 | 413 | "statistics": { |
408 | 414 | "inputs": { |
409 | 415 | "total_datasets": 0, |
@@ -469,6 +475,7 @@ async def test_get_runs_with_started_at( |
469 | 475 | { |
470 | 476 | "id": str(run.id), |
471 | 477 | "data": run_to_json(run), |
| 478 | + "job": job_to_json(run.job), |
472 | 479 | "statistics": { |
473 | 480 | "inputs": { |
474 | 481 | "total_datasets": 0, |
@@ -535,6 +542,7 @@ async def test_get_runs_with_ended_at( |
535 | 542 | { |
536 | 543 | "id": str(run.id), |
537 | 544 | "data": run_to_json(run), |
| 545 | + "job": job_to_json(run.job), |
538 | 546 | "statistics": { |
539 | 547 | "inputs": { |
540 | 548 | "total_datasets": 0, |
@@ -601,6 +609,7 @@ async def test_get_runs_with_location_id( |
601 | 609 | { |
602 | 610 | "id": str(run.id), |
603 | 611 | "data": run_to_json(run), |
| 612 | + "job": job_to_json(run.job), |
604 | 613 | "statistics": { |
605 | 614 | "inputs": { |
606 | 615 | "total_datasets": 0, |
@@ -650,6 +659,7 @@ async def test_get_runs_with_location_id( |
650 | 659 | { |
651 | 660 | "id": str(run.id), |
652 | 661 | "data": run_to_json(run), |
| 662 | + "job": job_to_json(run.job), |
653 | 663 | "statistics": { |
654 | 664 | "inputs": { |
655 | 665 | "total_datasets": 0, |
@@ -715,6 +725,7 @@ async def test_get_runs_with_started_by_user( |
715 | 725 | { |
716 | 726 | "id": str(run.id), |
717 | 727 | "data": run_to_json(run), |
| 728 | + "job": job_to_json(run.job), |
718 | 729 | "statistics": { |
719 | 730 | "inputs": { |
720 | 731 | "total_datasets": 0, |
@@ -764,6 +775,7 @@ async def test_get_runs_with_started_by_user( |
764 | 775 | { |
765 | 776 | "id": str(run.id), |
766 | 777 | "data": run_to_json(run), |
| 778 | + "job": job_to_json(run.job), |
767 | 779 | "statistics": { |
768 | 780 | "inputs": { |
769 | 781 | "total_datasets": 0, |
|
0 commit comments