baseline: 批次A-D 成果 + membership 半成品(测试红)

This commit is contained in:
agent
2026-09-11 23:11:35 +08:00
commit b3f3095d53
311 changed files with 40540 additions and 0 deletions
+26
View File
@@ -0,0 +1,26 @@
"""测试环境配置:内存 SQLite + pytest。"""
from .base import * # noqa
DEBUG = False
DATABASES = {
"default": {
"ENGINE": "django.db.backends.sqlite3",
"NAME": ":memory:",
}
}
# 测试时禁用迁移,按需 fixture 创建 schema
class DisableMigrations:
def __contains__(self, item):
return True
def __getitem__(self, item):
return None
MIGRATION_MODULES = DisableMigrations()
# 测试用 PASSWORD_HASHERS 加速
PASSWORD_HASHERS = ["django.contrib.auth.hashers.MD5PasswordHasher"]