os.getenv -> config.py

This commit is contained in:
xds
2026-02-19 13:00:51 +03:00
parent 4af5134726
commit dd0f8a1cb6
11 changed files with 48 additions and 52 deletions

View File

@@ -10,10 +10,11 @@ from repos.dao import DAO
from models.Album import Album
from models.Generation import Generation, GenerationStatus
from models.enums import AspectRatios, Quality
from config import settings
# Mock config
# Use the same host as aiws.py but different DB
MONGO_HOST = os.getenv("MONGO_HOST", "mongodb://admin:super_secure_password@31.59.58.220:27017")
MONGO_HOST = settings.MONGO_HOST
DB_NAME = "bot_db_test_albums"
async def test_albums():
@@ -83,8 +84,6 @@ async def test_albums():
client.close()
if __name__ == "__main__":
from dotenv import load_dotenv
load_dotenv()
try:
asyncio.run(test_albums())
except Exception as e: