MibooGram/tests/integration/test_mysql.py
洛水居室 233e7ab58d
♻️ PaiGram V4
Co-authored-by: luoshuijs <luoshuijs@outlook.com>
Co-authored-by: Karako <karakohear@gmail.com>
Co-authored-by: xtaodada <xtao@xtaolink.cn>
2023-03-14 09:27:22 +08:00

22 lines
493 B
Python

import logging
import pytest
from sqlmodel import SQLModel
from core.services.players.models import PlayersDataBase
logger = logging.getLogger()
logger.info("%s", PlayersDataBase.__name__)
# noinspection PyShadowingNames
@pytest.mark.asyncio
async def test_mysql(mysql):
assert mysql
async def test_init_create_all(mysql):
async with mysql.engine.begin() as conn:
await conn.run_sync(SQLModel.metadata.drop_all)
await conn.run_sync(SQLModel.metadata.create_all)