Added pytest configuration and first 4 unit tests
All checks were successful
AWS Deploy on Push / build (push) Successful in 1m4s
All checks were successful
AWS Deploy on Push / build (push) Successful in 1m4s
This commit is contained in:
10
app/main.py
10
app/main.py
@@ -1,9 +1,19 @@
|
||||
|
||||
from fastapi.concurrency import asynccontextmanager
|
||||
from app.routers import channels, auth, playlist, priorities
|
||||
from fastapi import FastAPI
|
||||
from fastapi.openapi.utils import get_openapi
|
||||
|
||||
from app.utils.database import init_db
|
||||
|
||||
@asynccontextmanager
|
||||
async def lifespan(app: FastAPI):
|
||||
# Initialize database tables on startup
|
||||
init_db()
|
||||
yield
|
||||
|
||||
app = FastAPI(
|
||||
lifespan=lifespan,
|
||||
title="IPTV Updater API",
|
||||
description="API for IPTV Updater service",
|
||||
version="1.0.0",
|
||||
|
||||
Reference in New Issue
Block a user