99import pytest
1010from celery .exceptions import CeleryError
1111from faker import Faker
12+ from fastapi import FastAPI
1213from models_library .api_schemas_long_running_tasks .tasks import TaskResult
1314from models_library .api_schemas_rpc_async_jobs .async_jobs import (
1415 AsyncJobGet ,
@@ -158,6 +159,7 @@ class UserWithFile(NamedTuple):
158159 indirect = True ,
159160)
160161async def test_start_data_export_success (
162+ initialized_app : FastAPI ,
161163 storage_rabbitmq_rpc_client : RabbitMQRPCClient ,
162164 mock_celery_client : _MockCeleryClient ,
163165 with_random_project_with_files : tuple [
@@ -221,6 +223,7 @@ async def test_start_data_export_success(
221223 indirect = True ,
222224)
223225async def test_start_data_export_scheduler_error (
226+ initialized_app : FastAPI ,
224227 storage_rabbitmq_rpc_client : RabbitMQRPCClient ,
225228 mock_celery_client : _MockCeleryClient ,
226229 with_random_project_with_files : tuple [
@@ -255,6 +258,7 @@ async def test_start_data_export_scheduler_error(
255258 indirect = True ,
256259)
257260async def test_start_data_export_access_error (
261+ initialized_app : FastAPI ,
258262 storage_rabbitmq_rpc_client : RabbitMQRPCClient ,
259263 mock_celery_client : _MockCeleryClient ,
260264 user_id : UserID ,
@@ -286,6 +290,7 @@ async def test_start_data_export_access_error(
286290 indirect = True ,
287291)
288292async def test_abort_data_export_success (
293+ initialized_app : FastAPI ,
289294 storage_rabbitmq_rpc_client : RabbitMQRPCClient ,
290295 mock_celery_client : _MockCeleryClient ,
291296):
@@ -316,6 +321,7 @@ async def test_abort_data_export_success(
316321 indirect = ["mock_celery_client" ],
317322)
318323async def test_abort_data_export_error (
324+ initialized_app : FastAPI ,
319325 storage_rabbitmq_rpc_client : RabbitMQRPCClient ,
320326 mock_celery_client : _MockCeleryClient ,
321327 expected_exception_type : type [Exception ],
@@ -350,6 +356,7 @@ async def test_abort_data_export_error(
350356 indirect = True ,
351357)
352358async def test_get_data_export_status (
359+ initialized_app : FastAPI ,
353360 storage_rabbitmq_rpc_client : RabbitMQRPCClient ,
354361 mock_celery_client : _MockCeleryClient ,
355362):
@@ -387,6 +394,7 @@ async def test_get_data_export_status(
387394 indirect = ["mock_celery_client" ],
388395)
389396async def test_get_data_export_status_error (
397+ initialized_app : FastAPI ,
390398 storage_rabbitmq_rpc_client : RabbitMQRPCClient ,
391399 mock_celery_client : _MockCeleryClient ,
392400 expected_exception_type : type [Exception ],
@@ -422,6 +430,7 @@ async def test_get_data_export_status_error(
422430 indirect = True ,
423431)
424432async def test_get_data_export_result_success (
433+ initialized_app : FastAPI ,
425434 storage_rabbitmq_rpc_client : RabbitMQRPCClient ,
426435 mock_celery_client : _MockCeleryClient ,
427436):
@@ -497,6 +506,7 @@ async def test_get_data_export_result_success(
497506 indirect = ["mock_celery_client" ],
498507)
499508async def test_get_data_export_result_error (
509+ initialized_app : FastAPI ,
500510 storage_rabbitmq_rpc_client : RabbitMQRPCClient ,
501511 mock_celery_client : _MockCeleryClient ,
502512 expected_exception : type [Exception ],
@@ -525,6 +535,7 @@ async def test_get_data_export_result_error(
525535 indirect = True ,
526536)
527537async def test_list_jobs_success (
538+ initialized_app : FastAPI ,
528539 storage_rabbitmq_rpc_client : RabbitMQRPCClient ,
529540 mock_celery_client : MockerFixture ,
530541):
@@ -548,6 +559,7 @@ async def test_list_jobs_success(
548559 indirect = True ,
549560)
550561async def test_list_jobs_error (
562+ initialized_app : FastAPI ,
551563 storage_rabbitmq_rpc_client : RabbitMQRPCClient ,
552564 mock_celery_client : MockerFixture ,
553565):
0 commit comments