[FIX] mail_layout_preview: fix unit test

pull/1371/head
Ernesto Tejeda 2022-01-14 13:48:10 -05:00 committed by Ruchir Shukla
parent 82a20060d8
commit 1c812529c4
2 changed files with 3 additions and 4 deletions

View File

@ -5,7 +5,7 @@
"name": "Mail Preview",
"summary": """
Preview email templates in the browser""",
"version": "14.0.1.0.0",
"version": "14.0.1.0.1",
"license": "AGPL-3",
"author": "Camptocamp SA,Odoo Community Association (OCA)",
"website": "https://github.com/OCA/social",

View File

@ -63,9 +63,8 @@ class TestController(HttpCase, TestLayoutMixin):
templates = self.env["mail.template"].search([("model_id.model", "=", model)])
url_pattern = "/email-preview/res.partner/mail.email_template_partner/{}"
for el, tmpl in zip(list_items, templates):
self.assertEqual(
el.attrib, {"class": "preview", "href": url_pattern.format(tmpl.id)}
)
self.assertEqual(el.attrib["class"], "preview")
self.assertEqual(el.attrib["href"], url_pattern.format(tmpl.id))
def test_controller2(self):
self.authenticate("admin", "admin")