refactor: 移除 SMTP 相关代码,简化用户创建流程,更新文档

This commit is contained in:
2026-04-13 12:27:14 +08:00
parent 919c561629
commit 66c254e0ff
13 changed files with 41 additions and 466 deletions
-29
View File
@@ -6,7 +6,6 @@ import pytest
from pydantic import ValidationError
from tjhlp.models import (
CredentialRecord,
GiteaIssue,
GiteaLabel,
GiteaRepo,
@@ -60,34 +59,6 @@ class TestMemberRecord:
MemberRecord(id="123", name="测试") # type: ignore
class TestCredentialRecord:
def test_basic(self):
c = CredentialRecord(
id="2659999",
name="赵一伤",
role=MemberRole.STUDENT,
username="2659999",
password="abc123",
email="[email protected]",
)
assert c.username == "2659999"
assert c.password == "abc123"
def test_model_dump(self):
c = CredentialRecord(
id="2659999",
name="赵一伤",
role=MemberRole.STUDENT,
username="2659999",
password="abc123",
email="[email protected]",
)
d = c.model_dump()
assert d["id"] == "2659999"
assert d["password"] == "abc123"
assert len(d) == 6
class TestGiteaModels:
def test_gitea_user(self):
u = GiteaUser(id=1, login="admin", full_name="Admin", is_admin=True)