fix: use single-image wording for 1-image quote flow
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user