Files
site/WESP_REL/tests/wesp_test_helpers.py
2026-07-17 12:57:18 +03:00

20 lines
498 B
Python

"""Общие хелперы для автотестов WESP."""
from __future__ import annotations
from typing import Type
from flask import Flask
from app import create_app
from config import TestingConfig
def create_test_app(
config_class: Type = TestingConfig,
*,
run_migrations: bool = False,
) -> Flask:
"""Flask app для тестов (по умолчанию TestingConfig + bypass setup guard)."""
return create_app(config_class, run_migrations=run_migrations)