From 38e42919b7d2c95afa3ee43d95d8a56af6e88e9a Mon Sep 17 00:00:00 2001 From: mobyw <44370805+mobyw@users.noreply.github.com> Date: Thu, 30 May 2024 14:13:11 +0800 Subject: [PATCH] =?UTF-8?q?:memo:=20Docs:=20=E4=BF=AE=E5=A4=8D=E5=8D=95?= =?UTF-8?q?=E5=85=83=E6=B5=8B=E8=AF=95=E7=A4=BA=E4=BE=8B=E4=BB=A3=E7=A0=81?= =?UTF-8?q?=20(#2741)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- website/docs/best-practice/testing/README.mdx | 6 +++--- website/docs/best-practice/testing/behavior.mdx | 10 +++++----- .../version-2.2.1/best-practice/testing/README.mdx | 6 +++--- .../version-2.2.1/best-practice/testing/behavior.mdx | 10 +++++----- .../version-2.3.0/best-practice/testing/README.mdx | 6 +++--- .../version-2.3.0/best-practice/testing/behavior.mdx | 10 +++++----- .../version-2.3.1/best-practice/testing/README.mdx | 6 +++--- .../version-2.3.1/best-practice/testing/behavior.mdx | 10 +++++----- 8 files changed, 32 insertions(+), 32 deletions(-) diff --git a/website/docs/best-practice/testing/README.mdx b/website/docs/best-practice/testing/README.mdx index 084336a5..64f03f98 100644 --- a/website/docs/best-practice/testing/README.mdx +++ b/website/docs/best-practice/testing/README.mdx @@ -150,7 +150,7 @@ async def test_weather(app: App): time=datetime.now(), self_id="test", message=Message("/天气 北京"), - user=User(user_id=123456789), + user=User(id="user"), ) ``` @@ -165,7 +165,7 @@ async def test_weather(app: App): time=datetime.now(), self_id="test", message=Message("/天气 北京"), - user=User(user_id=123456789), + user=User(id="user"), ) async with app.test_matcher(weather) as ctx: bot = ctx.create_bot() @@ -184,7 +184,7 @@ def make_event(message: str = "") -> MessageEvent: time=datetime.now(), self_id="test", message=Message(message), - user=User(user_id=123456789), + user=User(id="user"), ) @pytest.mark.asyncio diff --git a/website/docs/best-practice/testing/behavior.mdx b/website/docs/best-practice/testing/behavior.mdx index a69540f1..f54eeb66 100644 --- a/website/docs/best-practice/testing/behavior.mdx +++ b/website/docs/best-practice/testing/behavior.mdx @@ -56,7 +56,7 @@ def make_event(message: str = "") -> MessageEvent: time=datetime.now(), self_id="test", message=Message(message), - user=User(user_id=123456789), + user=User(id="user"), ) @pytest.mark.asyncio @@ -95,7 +95,7 @@ def make_event(message: str = "") -> MessageEvent: time=datetime.now(), self_id="test", message=Message(message), - user=User(user_id=123456789), + user=User(id="user"), ) @pytest.mark.asyncio @@ -131,7 +131,7 @@ def make_event(message: str = "") -> MessageEvent: time=datetime.now(), self_id="test", message=Message(message), - user=User(user_id=123456789), + user=User(id="user"), ) @pytest.mark.asyncio @@ -202,7 +202,7 @@ def make_event(message: str = "") -> MessageEvent: time=datetime.now(), self_id="test", message=Message(message), - user=User(user_id=123456789), + user=User(id="user"), ) @pytest.mark.asyncio @@ -264,7 +264,7 @@ def make_event(message: str = "") -> MessageEvent: time=datetime.now(), self_id="test", message=Message(message), - user=User(user_id=123456789), + user=User(id="user"), ) @pytest.mark.asyncio diff --git a/website/versioned_docs/version-2.2.1/best-practice/testing/README.mdx b/website/versioned_docs/version-2.2.1/best-practice/testing/README.mdx index 084336a5..64f03f98 100644 --- a/website/versioned_docs/version-2.2.1/best-practice/testing/README.mdx +++ b/website/versioned_docs/version-2.2.1/best-practice/testing/README.mdx @@ -150,7 +150,7 @@ async def test_weather(app: App): time=datetime.now(), self_id="test", message=Message("/天气 北京"), - user=User(user_id=123456789), + user=User(id="user"), ) ``` @@ -165,7 +165,7 @@ async def test_weather(app: App): time=datetime.now(), self_id="test", message=Message("/天气 北京"), - user=User(user_id=123456789), + user=User(id="user"), ) async with app.test_matcher(weather) as ctx: bot = ctx.create_bot() @@ -184,7 +184,7 @@ def make_event(message: str = "") -> MessageEvent: time=datetime.now(), self_id="test", message=Message(message), - user=User(user_id=123456789), + user=User(id="user"), ) @pytest.mark.asyncio diff --git a/website/versioned_docs/version-2.2.1/best-practice/testing/behavior.mdx b/website/versioned_docs/version-2.2.1/best-practice/testing/behavior.mdx index a69540f1..f54eeb66 100644 --- a/website/versioned_docs/version-2.2.1/best-practice/testing/behavior.mdx +++ b/website/versioned_docs/version-2.2.1/best-practice/testing/behavior.mdx @@ -56,7 +56,7 @@ def make_event(message: str = "") -> MessageEvent: time=datetime.now(), self_id="test", message=Message(message), - user=User(user_id=123456789), + user=User(id="user"), ) @pytest.mark.asyncio @@ -95,7 +95,7 @@ def make_event(message: str = "") -> MessageEvent: time=datetime.now(), self_id="test", message=Message(message), - user=User(user_id=123456789), + user=User(id="user"), ) @pytest.mark.asyncio @@ -131,7 +131,7 @@ def make_event(message: str = "") -> MessageEvent: time=datetime.now(), self_id="test", message=Message(message), - user=User(user_id=123456789), + user=User(id="user"), ) @pytest.mark.asyncio @@ -202,7 +202,7 @@ def make_event(message: str = "") -> MessageEvent: time=datetime.now(), self_id="test", message=Message(message), - user=User(user_id=123456789), + user=User(id="user"), ) @pytest.mark.asyncio @@ -264,7 +264,7 @@ def make_event(message: str = "") -> MessageEvent: time=datetime.now(), self_id="test", message=Message(message), - user=User(user_id=123456789), + user=User(id="user"), ) @pytest.mark.asyncio diff --git a/website/versioned_docs/version-2.3.0/best-practice/testing/README.mdx b/website/versioned_docs/version-2.3.0/best-practice/testing/README.mdx index 084336a5..64f03f98 100644 --- a/website/versioned_docs/version-2.3.0/best-practice/testing/README.mdx +++ b/website/versioned_docs/version-2.3.0/best-practice/testing/README.mdx @@ -150,7 +150,7 @@ async def test_weather(app: App): time=datetime.now(), self_id="test", message=Message("/天气 北京"), - user=User(user_id=123456789), + user=User(id="user"), ) ``` @@ -165,7 +165,7 @@ async def test_weather(app: App): time=datetime.now(), self_id="test", message=Message("/天气 北京"), - user=User(user_id=123456789), + user=User(id="user"), ) async with app.test_matcher(weather) as ctx: bot = ctx.create_bot() @@ -184,7 +184,7 @@ def make_event(message: str = "") -> MessageEvent: time=datetime.now(), self_id="test", message=Message(message), - user=User(user_id=123456789), + user=User(id="user"), ) @pytest.mark.asyncio diff --git a/website/versioned_docs/version-2.3.0/best-practice/testing/behavior.mdx b/website/versioned_docs/version-2.3.0/best-practice/testing/behavior.mdx index a69540f1..f54eeb66 100644 --- a/website/versioned_docs/version-2.3.0/best-practice/testing/behavior.mdx +++ b/website/versioned_docs/version-2.3.0/best-practice/testing/behavior.mdx @@ -56,7 +56,7 @@ def make_event(message: str = "") -> MessageEvent: time=datetime.now(), self_id="test", message=Message(message), - user=User(user_id=123456789), + user=User(id="user"), ) @pytest.mark.asyncio @@ -95,7 +95,7 @@ def make_event(message: str = "") -> MessageEvent: time=datetime.now(), self_id="test", message=Message(message), - user=User(user_id=123456789), + user=User(id="user"), ) @pytest.mark.asyncio @@ -131,7 +131,7 @@ def make_event(message: str = "") -> MessageEvent: time=datetime.now(), self_id="test", message=Message(message), - user=User(user_id=123456789), + user=User(id="user"), ) @pytest.mark.asyncio @@ -202,7 +202,7 @@ def make_event(message: str = "") -> MessageEvent: time=datetime.now(), self_id="test", message=Message(message), - user=User(user_id=123456789), + user=User(id="user"), ) @pytest.mark.asyncio @@ -264,7 +264,7 @@ def make_event(message: str = "") -> MessageEvent: time=datetime.now(), self_id="test", message=Message(message), - user=User(user_id=123456789), + user=User(id="user"), ) @pytest.mark.asyncio diff --git a/website/versioned_docs/version-2.3.1/best-practice/testing/README.mdx b/website/versioned_docs/version-2.3.1/best-practice/testing/README.mdx index 084336a5..64f03f98 100644 --- a/website/versioned_docs/version-2.3.1/best-practice/testing/README.mdx +++ b/website/versioned_docs/version-2.3.1/best-practice/testing/README.mdx @@ -150,7 +150,7 @@ async def test_weather(app: App): time=datetime.now(), self_id="test", message=Message("/天气 北京"), - user=User(user_id=123456789), + user=User(id="user"), ) ``` @@ -165,7 +165,7 @@ async def test_weather(app: App): time=datetime.now(), self_id="test", message=Message("/天气 北京"), - user=User(user_id=123456789), + user=User(id="user"), ) async with app.test_matcher(weather) as ctx: bot = ctx.create_bot() @@ -184,7 +184,7 @@ def make_event(message: str = "") -> MessageEvent: time=datetime.now(), self_id="test", message=Message(message), - user=User(user_id=123456789), + user=User(id="user"), ) @pytest.mark.asyncio diff --git a/website/versioned_docs/version-2.3.1/best-practice/testing/behavior.mdx b/website/versioned_docs/version-2.3.1/best-practice/testing/behavior.mdx index a69540f1..f54eeb66 100644 --- a/website/versioned_docs/version-2.3.1/best-practice/testing/behavior.mdx +++ b/website/versioned_docs/version-2.3.1/best-practice/testing/behavior.mdx @@ -56,7 +56,7 @@ def make_event(message: str = "") -> MessageEvent: time=datetime.now(), self_id="test", message=Message(message), - user=User(user_id=123456789), + user=User(id="user"), ) @pytest.mark.asyncio @@ -95,7 +95,7 @@ def make_event(message: str = "") -> MessageEvent: time=datetime.now(), self_id="test", message=Message(message), - user=User(user_id=123456789), + user=User(id="user"), ) @pytest.mark.asyncio @@ -131,7 +131,7 @@ def make_event(message: str = "") -> MessageEvent: time=datetime.now(), self_id="test", message=Message(message), - user=User(user_id=123456789), + user=User(id="user"), ) @pytest.mark.asyncio @@ -202,7 +202,7 @@ def make_event(message: str = "") -> MessageEvent: time=datetime.now(), self_id="test", message=Message(message), - user=User(user_id=123456789), + user=User(id="user"), ) @pytest.mark.asyncio @@ -264,7 +264,7 @@ def make_event(message: str = "") -> MessageEvent: time=datetime.now(), self_id="test", message=Message(message), - user=User(user_id=123456789), + user=User(id="user"), ) @pytest.mark.asyncio