Fixed unit tests

This commit is contained in:
2025-09-17 21:24:03 +02:00
parent 2958d5cf82
commit da63f1b75b
7 changed files with 210 additions and 219 deletions

View File

@@ -10,6 +10,8 @@ from pydantic import BaseModel
import redis
from celery import Celery
from database.connection import test_database_connection
# Initialize FastAPI app
app = FastAPI(
title="MyDocManager File Processor",
@@ -68,6 +70,12 @@ async def health_check():
health_status["dependencies"]["redis"] = "disconnected"
health_status["status"] = "degraded"
# check MongoDB connection
if test_database_connection():
health_status["dependencies"]["mongodb"] = "connected"
else:
health_status["dependencies"]["mongodb"] = "disconnected"
return health_status