feat: update login api
This commit is contained in:
+4
-1
@@ -37,6 +37,7 @@ USER_RESET_PWD_URL = '/api/user/auth/reset-password/'
|
||||
USER_CHANGE_PWD_URL = '/api/user/users/change-password/'
|
||||
USER_ME_URL = '/api/user/users/me/'
|
||||
USER_LIST_URL = '/api/user/users/'
|
||||
USER_INSTITUTION_LIST_URL = '/api/user/institution_list/'
|
||||
|
||||
# 病例
|
||||
CASE_PARSE_URL = '/api/case/cases/parse-pdf/'
|
||||
@@ -68,7 +69,8 @@ DEFAULT_INSTITUTION_NAME = '测试医院'
|
||||
# ─── 用户工具 ─────────────────────────────────────────────────────────────────
|
||||
|
||||
def create_test_user(phone='13900000001', password='TestPass1',
|
||||
real_name='测试用户', role_type='student', status=1):
|
||||
real_name='测试用户', role_type='student', status=1,
|
||||
institution=None):
|
||||
"""创建测试用户(已知密码),返回 User 实例。"""
|
||||
user = User.objects.create_user(
|
||||
username=phone,
|
||||
@@ -77,6 +79,7 @@ def create_test_user(phone='13900000001', password='TestPass1',
|
||||
real_name=real_name,
|
||||
role_type=role_type,
|
||||
status=status,
|
||||
institution=institution,
|
||||
)
|
||||
return user
|
||||
|
||||
|
||||
Reference in New Issue
Block a user