feat: enforce activity logs and tighten sizing/map reply policies
This commit is contained in:
@@ -364,6 +364,27 @@ class RegressionPipelineTest(unittest.IsolatedAsyncioTestCase):
|
||||
)
|
||||
self.assertEqual(reply, "图片收到了,你继续发就行。")
|
||||
|
||||
async def test_map_inquiry_is_rejected(self):
|
||||
agent = CustomerServiceAgent()
|
||||
msg = CustomerMessage(
|
||||
msg_id="m-map-reject",
|
||||
acc_id="test_shop",
|
||||
msg="这个地图能做吗",
|
||||
from_id=self.customer_id,
|
||||
from_name="t",
|
||||
cy_id=self.customer_id,
|
||||
acc_type="AliWorkbench",
|
||||
msg_type=0,
|
||||
cy_name="t",
|
||||
goods_name="专业找图",
|
||||
goods_order="",
|
||||
)
|
||||
resp = await agent.process_message(msg)
|
||||
self.assertTrue(resp.should_reply)
|
||||
self.assertIn("地图", resp.reply)
|
||||
self.assertIn("不做", resp.reply)
|
||||
self.assertTrue(resp.reply.endswith(("嗯", "哦", "好的", "嗯咯", "嗯啦")))
|
||||
|
||||
def tearDown(self):
|
||||
db.clear_pending_quote_state(self.customer_id)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user