mirror of https://github.com/OCA/social.git
[FIX] mail_layout_preview: fix unit test
parent
82a20060d8
commit
1c812529c4
|
@ -5,7 +5,7 @@
|
||||||
"name": "Mail Preview",
|
"name": "Mail Preview",
|
||||||
"summary": """
|
"summary": """
|
||||||
Preview email templates in the browser""",
|
Preview email templates in the browser""",
|
||||||
"version": "14.0.1.0.0",
|
"version": "14.0.1.0.1",
|
||||||
"license": "AGPL-3",
|
"license": "AGPL-3",
|
||||||
"author": "Camptocamp SA,Odoo Community Association (OCA)",
|
"author": "Camptocamp SA,Odoo Community Association (OCA)",
|
||||||
"website": "https://github.com/OCA/social",
|
"website": "https://github.com/OCA/social",
|
||||||
|
|
|
@ -63,9 +63,8 @@ class TestController(HttpCase, TestLayoutMixin):
|
||||||
templates = self.env["mail.template"].search([("model_id.model", "=", model)])
|
templates = self.env["mail.template"].search([("model_id.model", "=", model)])
|
||||||
url_pattern = "/email-preview/res.partner/mail.email_template_partner/{}"
|
url_pattern = "/email-preview/res.partner/mail.email_template_partner/{}"
|
||||||
for el, tmpl in zip(list_items, templates):
|
for el, tmpl in zip(list_items, templates):
|
||||||
self.assertEqual(
|
self.assertEqual(el.attrib["class"], "preview")
|
||||||
el.attrib, {"class": "preview", "href": url_pattern.format(tmpl.id)}
|
self.assertEqual(el.attrib["href"], url_pattern.format(tmpl.id))
|
||||||
)
|
|
||||||
|
|
||||||
def test_controller2(self):
|
def test_controller2(self):
|
||||||
self.authenticate("admin", "admin")
|
self.authenticate("admin", "admin")
|
||||||
|
|
Loading…
Reference in New Issue