File tree Expand file tree Collapse file tree 1 file changed +12
-5
lines changed
diracx-db/tests/pilot_agents Expand file tree Collapse file tree 1 file changed +12
-5
lines changed Original file line number Diff line number Diff line change @@ -62,13 +62,20 @@ async def test_jobs_association(pilot_agents_db: PilotAgentsDB):
62
62
63
63
# Get the jobs associated with the first pilot
64
64
fetched_job_ids = await pilot_agents_db .get_pilot_job_ids (pilot_id )
65
+ # Convert to set, it is easier to play with
66
+ fetched_job_ids_set = set (fetched_job_ids )
67
+ job_ids_set = set (job_ids )
68
+
65
69
# Asserts
66
70
assert len (fetched_job_ids ) == len (job_ids )
67
- assert fetched_job_ids .issubset (job_ids )
68
- assert job_ids .issubset (fetched_job_ids )
71
+ assert fetched_job_ids_set == job_ids_set
69
72
70
73
# Get the jobs associated with the second pilot
71
- fetched_job_ids = await pilot_agents_db .get_pilot_job_ids (pilot_id_2 )
74
+ fetched_job_ids_2 = await pilot_agents_db .get_pilot_job_ids (pilot_id_2 )
75
+ # Convert to set, it is easier to play with
76
+ fetched_job_ids_set_2 = set (fetched_job_ids_2 )
77
+ job_ids_set_2 = set (job_ids_2 )
78
+
79
+ # Asserts
72
80
assert len (fetched_job_ids ) == len (job_ids_2 )
73
- assert fetched_job_ids .issubset (job_ids_2 )
74
- assert job_ids_2 .issubset (fetched_job_ids )
81
+ assert fetched_job_ids_set_2 == job_ids_set_2
You can’t perform that action at this time.
0 commit comments