first commit
This commit is contained in:
25
config/testing.py
Normal file
25
config/testing.py
Normal file
@@ -0,0 +1,25 @@
|
||||
"""
|
||||
测试环境配置
|
||||
"""
|
||||
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 = ['*']
|
||||
|
||||
Reference in New Issue
Block a user