A colleague wrote the test in the editor. It passed once, when they copied the reply they saw on screen. Since then it fails most days, and nobody trusts it.
When you submit, your test file runs against several builds of RefundBot that you cannot see. Some are correct and word their answers differently. Some have a fault planted in them. A good test passes on every correct build and fails on every faulty one.
Your task
- Click Run to see the starter test fail against the practice bot, and read why.
- Change the test so it checks the fact that matters (the 30-day window) instead of one exact sentence.
- Add a second test for something a support reply must never contain: personal data about another customer, such as an email address or a phone number.
Python regular expressions (re), patterns for finding text, are enough for this lesson. You do not need any other library.
Acme Store refund policy
- Most items can be returned within 30 days of delivery for a full refund.
- Refunds reach the original payment method within 5 to 7 business days of Acme receiving the item.
- Gift cards cannot be refunded.
- Damaged items: report within 48 hours of delivery with a photo, and pickup is free. Other return pickups cost Rs 99.