diff --git a/api/app/main.py b/api/app/main.py index bd83cf78..84941e9b 100644 --- a/api/app/main.py +++ b/api/app/main.py @@ -113,7 +113,7 @@ async def lifespan(fastapi: FastAPI): logger.info('Stopping service ...') -app = FastAPI(title='Radicalbit Platform', lifespan=lifespan, debug=False) +app = FastAPI(title='Radicalbit Platform', lifespan=lifespan) app.add_middleware( CORSMiddleware, diff --git a/api/tests/routes/healthcheck_test.py b/api/tests/routes/healthcheck_test.py index cb4825a6..46eb1238 100644 --- a/api/tests/routes/healthcheck_test.py +++ b/api/tests/routes/healthcheck_test.py @@ -2,7 +2,7 @@ from app import main -client = TestClient(main.app) +client = TestClient(main.app, raise_server_exceptions=False) def test_healthcheck(): diff --git a/api/tests/routes/metrics_route_test.py b/api/tests/routes/metrics_route_test.py index a35cb822..8208a62a 100644 --- a/api/tests/routes/metrics_route_test.py +++ b/api/tests/routes/metrics_route_test.py @@ -37,7 +37,7 @@ def setUpClass(cls): app.add_exception_handler(MetricsError, metrics_exception_handler) app.include_router(router, prefix=cls.prefix) - cls.client = TestClient(app) + cls.client = TestClient(app, raise_server_exceptions=False) def test_get_reference_statistics_by_model_by_uuid(self): model_uuid = uuid.uuid4() diff --git a/api/tests/routes/model_route_test.py b/api/tests/routes/model_route_test.py index b7288bb0..6b68eb1a 100644 --- a/api/tests/routes/model_route_test.py +++ b/api/tests/routes/model_route_test.py @@ -35,7 +35,7 @@ def setUpClass(cls): app.add_exception_handler(ModelError, model_exception_handler) app.include_router(router, prefix=cls.prefix) - cls.client = TestClient(app) + cls.client = TestClient(app, raise_server_exceptions=False) def test_create_model(self): model_in = db_mock.get_sample_model_in() diff --git a/api/tests/routes/modelin_validation_test.py b/api/tests/routes/modelin_validation_test.py index 5baa701e..56a22d56 100644 --- a/api/tests/routes/modelin_validation_test.py +++ b/api/tests/routes/modelin_validation_test.py @@ -15,7 +15,7 @@ class TestValidationModelRoute(unittest.TestCase): def setUp(self): self.model_service = MagicMock(spec_set=ModelService) self.prefix = '/api/models' - self.client = TestClient(main.app) + self.client = TestClient(main.app, raise_server_exceptions=False) def test_request_validation_exception_handler(self): modelin_data = get_model_sample_wrong( diff --git a/api/tests/routes/upload_dataset_route_test.py b/api/tests/routes/upload_dataset_route_test.py index 27b21cab..74316e85 100644 --- a/api/tests/routes/upload_dataset_route_test.py +++ b/api/tests/routes/upload_dataset_route_test.py @@ -32,7 +32,7 @@ def setUpClass(cls): app = FastAPI(title='Radicalbit Platform', debug=True) app.include_router(router, prefix=cls.prefix) - cls.client = TestClient(app) + cls.client = TestClient(app, raise_server_exceptions=False) def test_upload_reference(self): file = csv.get_correct_sample_csv_file()