• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

Ruberhauptmann / saboga-api / 15699538706

17 Jun 2025 06:08AM UTC coverage: 56.143% (+0.3%) from 55.873%
15699538706

Pull #119

github

web-flow
Merge 7891788e5 into cef4fc3ae
Pull Request #119: Add codspeed

8 of 16 new or added lines in 6 files covered. (50.0%)

393 of 700 relevant lines covered (56.14%)

1.12 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

55.56
/src/sabogaapi/api_v1/database.py
1
"""Database connection."""
2

3
import os
2✔
4

5
from beanie import init_beanie
2✔
6
from motor.motor_asyncio import AsyncIOMotorClient
2✔
7

8
from sabogaapi.api_v1.models import Boardgame, RankHistory
2✔
9

10

11
async def init_db() -> None:
2✔
12
    db_password = os.getenv("MONGODB_API_USER")
×
NEW
13
    host = os.getenv("MONGODB_HOST")
×
14
    client = AsyncIOMotorClient(  # type: ignore
×
15
        f"mongodb://api-user:{db_password}@{host}:27017/"
16
        "boardgames?authSource=boardgames"
17
    )
18
    await init_beanie(
×
19
        database=client.get_database(),
20
        document_models=[Boardgame, RankHistory],
21
    )
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc