fix: use single-image wording for 1-image quote flow

This commit is contained in:
2026-02-28 22:21:37 +08:00
parent d497e8d42a
commit 08342c37ec
2 changed files with 36 additions and 0 deletions

View File

@@ -61,6 +61,29 @@ class BatchQuoteReplyFormatTest(unittest.IsolatedAsyncioTestCase):
self.assertIn("打包", reply)
self.assertIn("", reply)
async def test_single_image_reply_avoids_batch_wording(self):
agent = CustomerServiceAgent()
results = [
(
"https://img.alicdn.com/a.jpg",
{
"complexity": "normal",
"reason": "常规处理",
"price_suggest": 20,
},
)
]
reply = agent._build_batch_quote_reply(
results=results,
total_suggest=20,
bundle_price=20,
req_fee={"extra": 0, "hits": []},
)
self.assertIn("这张", reply)
self.assertNotIn("这批", reply)
self.assertNotIn("先给你分图报下", reply)
self.assertNotIn("可选A", reply)
if __name__ == "__main__":
unittest.main(verbosity=2)