- Added support for CORS origins and a new environment variable for miniapp access control. - Implemented date validation for API requests to ensure correct date formats. - Updated FastAPI app to allow access without Telegram initData for local development. - Enhanced error handling and logging for better debugging. - Added tests for API functionality and Telegram initData validation. - Updated README with new environment variable details and testing instructions. - Modified Docker and Git ignore files to include additional directories and files.
7 lines
250 B
Python
7 lines
250 B
Python
"""Pytest configuration. Set BOT_TOKEN so config module can be imported."""
|
|
import os
|
|
|
|
# Set before any project code imports config (which requires BOT_TOKEN).
|
|
if not os.environ.get("BOT_TOKEN"):
|
|
os.environ["BOT_TOKEN"] = "test-token-for-pytest"
|