From c797d2a711aeacad4ae61014110d601b3af8f29d Mon Sep 17 00:00:00 2001 From: Fu Diwei Date: Wed, 4 Aug 2021 18:20:29 +0800 Subject: [PATCH] =?UTF-8?q?test(wxapi):=20=E9=80=82=E9=85=8D=E6=96=B0?= =?UTF-8?q?=E7=9A=84=E6=A8=A1=E5=9E=8B=E6=B5=8B=E8=AF=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../WxaSecurity/WxaMediaCheckEvent.json | 27 +++++++++++----- .../Wxa/Security/WxaMediaCheckRequest.json | 3 ++ .../WxaMessageSecurityCheckRequest.json | 5 ++- .../WxaMessageSecurityCheckResponse.json | 32 ++++++++++++++++++- 4 files changed, 57 insertions(+), 10 deletions(-) diff --git a/test/SKIT.FlurlHttpClient.Wechat.Api.UnitTests/EventSamples/WxaSecurity/WxaMediaCheckEvent.json b/test/SKIT.FlurlHttpClient.Wechat.Api.UnitTests/EventSamples/WxaSecurity/WxaMediaCheckEvent.json index 7466286b..cff0da9c 100644 --- a/test/SKIT.FlurlHttpClient.Wechat.Api.UnitTests/EventSamples/WxaSecurity/WxaMediaCheckEvent.json +++ b/test/SKIT.FlurlHttpClient.Wechat.Api.UnitTests/EventSamples/WxaSecurity/WxaMediaCheckEvent.json @@ -1,12 +1,23 @@ { - "ToUserName": "gh_38cc49f9733b", - "FromUserName": "oH1fu0FdHqpToe2T6gBj0WyB8iS1", - "CreateTime": 1552465698, + "ToUserName": "gh_9df7d78a1234", + "FromUserName": "o4_t144jTUSEoxydysUA2E234_tc", + "CreateTime": 1626959646, "MsgType": "event", "Event": "wxa_media_check", - "isrisky": 0, - "extra_info_json": "", - "appid": "wxd8c59133dfcbfc71", - "trace_id": "967e945cd8a3e458f3c74dcb886068e9", - "status_code": 0 + "appid": "wx8f16a5be77871234", + "trace_id": "60f96f1d-3845297a-1976a3ae", + "version": 2, + "detail": [ + { + "strategy": "content_model", + "errcode": 0, + "suggest": "pass", + "label": 100, + "prob": 90 + } + ], + "result": { + "suggest": "pass", + "label": 100 + } } \ No newline at end of file diff --git a/test/SKIT.FlurlHttpClient.Wechat.Api.UnitTests/ModelSamples/Wxa/Security/WxaMediaCheckRequest.json b/test/SKIT.FlurlHttpClient.Wechat.Api.UnitTests/ModelSamples/Wxa/Security/WxaMediaCheckRequest.json index dbd0aec0..cff1503e 100644 --- a/test/SKIT.FlurlHttpClient.Wechat.Api.UnitTests/ModelSamples/Wxa/Security/WxaMediaCheckRequest.json +++ b/test/SKIT.FlurlHttpClient.Wechat.Api.UnitTests/ModelSamples/Wxa/Security/WxaMediaCheckRequest.json @@ -1,4 +1,7 @@ { + "openid": "OPENID", + "scene": 1, + "version": 2, "media_url": "https://developers.weixin.qq.com/miniprogram/assets/images/head_global_z_@all.png", "media_type": 2 } \ No newline at end of file diff --git a/test/SKIT.FlurlHttpClient.Wechat.Api.UnitTests/ModelSamples/Wxa/Security/WxaMessageSecurityCheckRequest.json b/test/SKIT.FlurlHttpClient.Wechat.Api.UnitTests/ModelSamples/Wxa/Security/WxaMessageSecurityCheckRequest.json index 1b794c36..e5b99338 100644 --- a/test/SKIT.FlurlHttpClient.Wechat.Api.UnitTests/ModelSamples/Wxa/Security/WxaMessageSecurityCheckRequest.json +++ b/test/SKIT.FlurlHttpClient.Wechat.Api.UnitTests/ModelSamples/Wxa/Security/WxaMessageSecurityCheckRequest.json @@ -1,3 +1,6 @@ { - "content": "hello world!" + "openid": "OPENID", + "scene": 1, + "version": 2, + "content": "hello world!" } \ No newline at end of file diff --git a/test/SKIT.FlurlHttpClient.Wechat.Api.UnitTests/ModelSamples/Wxa/Security/WxaMessageSecurityCheckResponse.json b/test/SKIT.FlurlHttpClient.Wechat.Api.UnitTests/ModelSamples/Wxa/Security/WxaMessageSecurityCheckResponse.json index f752befe..abe0ae22 100644 --- a/test/SKIT.FlurlHttpClient.Wechat.Api.UnitTests/ModelSamples/Wxa/Security/WxaMessageSecurityCheckResponse.json +++ b/test/SKIT.FlurlHttpClient.Wechat.Api.UnitTests/ModelSamples/Wxa/Security/WxaMessageSecurityCheckResponse.json @@ -1,4 +1,34 @@ { "errcode": 0, - "errmsg": "ok" + "errmsg": "ok", + "result": { + "suggest": "risky", + "label": 20001 + }, + "detail": [ + { + "strategy": "content_model", + "errcode": 0, + "suggest": "risky", + "label": 20006, + "prob": 90 + }, + { + "strategy": "keyword", + "errcode": 0, + "suggest": "pass", + "label": 20006, + "level": 20, + "keyword": "命中的关键词1" + }, + { + "strategy": "keyword", + "errcode": 0, + "suggest": "risky", + "label": 20006, + "level": 90, + "keyword": "命中的关键词2" + } + ], + "trace_id": "60ae120f-371d5872-7941a05b" } \ No newline at end of file