Files
template/config/testing.py
2025-12-21 00:20:27 +08:00

26 lines
501 B
Python
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
"""
测试环境配置
"""
from .base import Config
class TestingConfig(Config):
"""
测试环境配置
使用内存数据库关闭CSRF保护
"""
DEBUG = True
TESTING = True
# 测试环境使用内存数据库
SQLALCHEMY_DATABASE_URI = 'sqlite:///:memory:'
# 测试环境关闭CSRF保护
WTF_CSRF_ENABLED = False
# 测试环境日志级别
LOG_LEVEL = 'DEBUG'
# 测试环境允许所有跨域请求
CORS_ORIGINS = ['*']