[FIX] test_mail_full: fix expected kpi in sms mailing report
`replied_ratio` shouldn't be tested against bounced_ratio, neither should be `opened_ratio` against `clicks_ratio`. `_prepare_statistics_email_values` function returns list, whose last two values are: `clicks_ratio` and `bounced_ratio` instead of `opened_ratio` and `replied_ratio`. Also checking `replied_ratio` and `opened_ratio` doesn't make sense, when testing sms. task-3485424 closes odoo/odoo#149267 X-original-commit: a2bb6dea6d81a777c7aed73c8b7a38e015408676 Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
This commit is contained in:
@@ -67,7 +67,7 @@ class TestMailingStatistics(TestMassSMSCommon):
|
||||
kpi_values = body_html.xpath('//table[@data-field="sms"]//*[hasclass("kpi_value")]/text()')
|
||||
self.assertEqual(
|
||||
[t.strip().strip('%') for t in kpi_values],
|
||||
['40.0', str(float(mailing.opened_ratio)), str(float(mailing.replied_ratio))]
|
||||
['40.0', str(float(mailing.clicks_ratio)), str(float(mailing.bounced_ratio))]
|
||||
)
|
||||
# test body content: clicks (a bit hackish but hey we are in stable)
|
||||
kpi_click_values = body_html.xpath('//table//tr[contains(@style,"color: #888888")]/td[contains(@style,"width: 30%")]/text()')
|
||||
|
||||
Reference in New Issue
Block a user