@@ -0,0 +1,19 @@
|
||||
"""Общие хелперы для автотестов 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)
|
||||
Reference in New Issue
Block a user