Test report
What is tested in TechnoVision WhatsApp Core, and how to run the suite.
- Module: technovision_whatsapp_core 18.0.1.0.0
- Tests: 80 across 6 files
- Result: 0 failed, 0 errors
- Run on: Odoo 18.0, PostgreSQL, with demo data
odoo-bin -d <database> -i technovision_whatsapp_core \
--test-enable --test-tags /technovision_whatsapp_core --stop-after-initWhat is covered
| File | Covers |
|---|---|
| test_phone.py | Number normalisation and the cases it deliberately refuses to guess at. |
| test_provider.py | The provider interface, resolution, the simulated provider, and Meta's response handling - including which failures are retryable. |
| test_message.py | Creating, sending, the state machine, and the log's write guard. |
| test_retry.py | Backoff, the attempt limit, permanent versus retryable failure, and the queue. |
| test_template.py | Rendering, placeholders, wrong-model rendering and preview. |
| test_security.py | Group permissions, multi-company isolation, the token, and that the administrator who installs it can use it. |
Things the tests exist to prevent
- A message shown as delivered because we hoped it was. Delivery states move only on a provider callback, and never backwards - providers repeat and reorder callbacks, and a late sent must not un-deliver a delivered message.
- A permanent failure retried forever. A number that is not on WhatsApp is not retried; a 502 is.
- A message lost because the queue stopped. The cron commits per message, so a gateway that hangs on the fortieth does not roll back the thirty-nine that went out.
- An administrator who installs the module and cannot use it. Two other modules in this catalogue shipped with exactly that defect. There is a test for it here.
Testing without credentials
Every test runs against the simulated provider. There is no Meta account, no network access and no mocking of Odoo internals anywhere in the suite. The Meta provider's own logic is tested through _interpret, which turns one captured HTTP response into a result - which is why the retry decisions can be tested at all.