feat: 支持按项目配置钉钉通知 @ 名单
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 5.5
parent
a4cd855b0c
commit
10c39b5116
@@ -328,3 +328,20 @@ def test_generic_patcher_replace_line_rule(dy_build_dir):
|
||||
apply_project_config(dy_build_dir, _dy_config(), project)
|
||||
macro = (dy_build_dir / "DyAuction" / "Public" / "DyConstantsMacro.h").read_text()
|
||||
assert '#define APPCHEME @"cn.touchv.auction2"' in macro
|
||||
|
||||
|
||||
def test_project_dingtalk_at_saved_and_returned(client, dy_project, tmp_config):
|
||||
resp = client.put("/api/config/projects/dyauction",
|
||||
json={"dingtalk_at": {"at_mobiles": "13800000001,13800000002\n13800000001"}})
|
||||
assert resp.status_code == 200, resp.text
|
||||
dy = _root(tmp_config)["projects"]["dyauction"]
|
||||
assert dy["dingtalk_at"] == {"at_mobiles": ["13800000001", "13800000002"], "at_mobiles_app_store": []}
|
||||
|
||||
listed = {p["id"]: p for p in client.get("/api/config/projects").json()}
|
||||
assert listed["dyauction"]["dingtalk_at"]["at_mobiles"] == ["13800000001", "13800000002"]
|
||||
assert listed["readoor"]["dingtalk_at"] == {"at_mobiles": [], "at_mobiles_app_store": []}
|
||||
|
||||
|
||||
def test_project_dingtalk_at_must_be_object(client, dy_project):
|
||||
resp = client.put("/api/config/projects/dyauction", json={"dingtalk_at": ["138"]})
|
||||
assert resp.status_code == 400
|
||||
|
||||
Reference in New Issue
Block a user