[MIG] html_text: Migration to 15.0

pull/2590/head
Mantux11 2022-01-13 11:01:34 +00:00 committed by dsolanki
parent 184b6d4e1c
commit e21db2d290
4 changed files with 7 additions and 3 deletions

View File

@ -95,6 +95,7 @@ Contributors
* Dennis Sluijk <d.sluijk@onestein.nl> * Dennis Sluijk <d.sluijk@onestein.nl>
* `Tecnativa <https://www.tecnativa.com>`_:", * `Tecnativa <https://www.tecnativa.com>`_:",
* Helly kapatel <helly.kapatel@initos.com> * Helly kapatel <helly.kapatel@initos.com>
* Mantas Šniukas <mantas@vialaurea.lt>
* Jairo Llopis * Jairo Llopis
* Vicent Cubells * Vicent Cubells

View File

@ -4,7 +4,7 @@
{ {
"name": "Text from HTML field", "name": "Text from HTML field",
"summary": "Generate excerpts from any HTML field", "summary": "Generate excerpts from any HTML field",
"version": "14.0.1.0.0", "version": "15.0.1.0.0",
"category": "Tools", "category": "Tools",
"website": "https://github.com/OCA/server-tools", "website": "https://github.com/OCA/server-tools",
"author": "Grupo ESOC Ingeniería de Servicios, " "author": "Grupo ESOC Ingeniería de Servicios, "

View File

@ -1,6 +1,7 @@
* Dennis Sluijk <d.sluijk@onestein.nl> * Dennis Sluijk <d.sluijk@onestein.nl>
* `Tecnativa <https://www.tecnativa.com>`_:", * `Tecnativa <https://www.tecnativa.com>`_:",
* Helly kapatel <helly.kapatel@initos.com> * Helly kapatel <helly.kapatel@initos.com>
* Mantas Šniukas <mantas@vialaurea.lt>
* Jairo Llopis * Jairo Llopis
* Vicent Cubells * Vicent Cubells

View File

@ -1,6 +1,8 @@
# Copyright 2016-2017 Jairo Llopis <jairo.llopis@tecnativa.com> # Copyright 2016-2017 Jairo Llopis <jairo.llopis@tecnativa.com>
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). # License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
from lxml import etree
from odoo.tests.common import TransactionCase from odoo.tests.common import TransactionCase
from odoo.tools import mute_logger from odoo.tools import mute_logger
@ -43,12 +45,12 @@ class ExtractorCase(TransactionCase):
def test_empty_html(self): def test_empty_html(self):
"""Empty HTML handled correctly.""" """Empty HTML handled correctly."""
self.assertEqual(self.text_from_html(""), "") self.assertEqual(self.text_from_html(""), "")
with self.assertRaises(Exception): with self.assertRaises(etree.ParserError):
self.text_from_html("", fail=True) self.text_from_html("", fail=True)
@mute_logger("odoo.addons.html_text.models.ir_fields_converter") @mute_logger("odoo.addons.html_text.models.ir_fields_converter")
def test_false_html(self): def test_false_html(self):
"""``False`` HTML handled correctly.""" """``False`` HTML handled correctly."""
self.assertEqual(self.text_from_html(False), "") self.assertEqual(self.text_from_html(False), "")
with self.assertRaises(Exception): with self.assertRaises(TypeError):
self.text_from_html(False, fail=True) self.text_from_html(False, fail=True)