37
37
"time" : ["06:00" ],
38
38
}
39
39
}
40
- POST_PROCESS_REQUEST_BODY_SUCCESS_W_LICENCES = {
41
- "inputs" : {
42
- "product_type" : ["reanalysis" ],
43
- "format" : ["grib" ],
44
- "variable" : ["temperature" ],
45
- "pressure_level" : ["1" ],
46
- "year" : ["1971" ],
47
- "month" : ["01" ],
48
- "day" : ["25" ],
49
- "time" : ["06:00" ],
50
- },
51
- "acceptedLicences" : [{"id" : "licence-to-use-copernicus-products" , "revision" : 12 }],
52
- }
53
40
POST_PROCESS_REQUEST_BODY_FAIL = {
54
41
"inputs" : {
55
42
"product_type" : ["reanalysis" ],
@@ -263,25 +250,7 @@ def test_post_process_execution_stored_accepted_licences(
263
250
)
264
251
265
252
266
- def test_post_process_execution_context_accepted_licences (
267
- dev_env_proc_api_url : str ,
268
- ) -> None :
269
- response = submit_job (
270
- dev_env_proc_api_url ,
271
- request_body = POST_PROCESS_REQUEST_BODY_SUCCESS_W_LICENCES ,
272
- auth_headers = AUTH_HEADERS_VALID_2 ,
273
- )
274
- response_status_code = response .status_code
275
- exp_status_code = 201
276
- assert response_status_code == exp_status_code
277
-
278
- response = delete_job (
279
- dev_env_proc_api_url ,
280
- response .json ()["jobID" ],
281
- auth_headers = AUTH_HEADERS_VALID_2 ,
282
- )
283
-
284
-
253
+ @pytest .mark .skip (reason = "Submission of jobs with accepted licences is no more allowed" )
285
254
def test_post_process_execution_anon_user (
286
255
dev_env_proc_api_url : str ,
287
256
) -> None :
@@ -292,7 +261,7 @@ def test_post_process_execution_anon_user(
292
261
293
262
response = submit_job (
294
263
dev_env_proc_api_url ,
295
- request_body = POST_PROCESS_REQUEST_BODY_SUCCESS_W_LICENCES ,
264
+ request_body = POST_PROCESS_REQUEST_BODY_SUCCESS ,
296
265
auth_headers = AUTH_HEADERS_VALID_ANON ,
297
266
)
298
267
response_status_code = response .status_code
@@ -318,6 +287,7 @@ def test_post_process_execution_not_authorized(
318
287
assert response .status_code == exp_status_code
319
288
320
289
290
+ @pytest .mark .skip (reason = "Test is not valid anymore" )
321
291
def test_post_process_execution_missing_licences (
322
292
dev_env_proc_api_url : str ,
323
293
) -> None :
@@ -591,13 +561,16 @@ def test_get_jobs(dev_env_proc_api_url: str) -> None:
591
561
assert all ([key in response_body for key in exp_keys ])
592
562
593
563
594
- def test_get_jobs_different_user (dev_env_proc_api_url : str ) -> None :
564
+ def test_get_jobs_different_user (
565
+ dev_env_prof_api_url : str , dev_env_proc_api_url : str
566
+ ) -> None :
567
+ response = accept_licence (dev_env_prof_api_url , auth_headers = AUTH_HEADERS_VALID_2 )
595
568
number_of_new_jobs = 1
596
569
job_ids : list [str ] = []
597
570
for _ in range (number_of_new_jobs ):
598
571
response = submit_job (
599
572
dev_env_proc_api_url ,
600
- request_body = POST_PROCESS_REQUEST_BODY_SUCCESS_W_LICENCES ,
573
+ request_body = POST_PROCESS_REQUEST_BODY_SUCCESS ,
601
574
auth_headers = AUTH_HEADERS_VALID_2 ,
602
575
)
603
576
job_ids .append (response .json ()["jobID" ])
0 commit comments