[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>
* `Tecnativa <https://www.tecnativa.com>`_:",
* Helly kapatel <helly.kapatel@initos.com>
* Mantas Šniukas <mantas@vialaurea.lt>
* Jairo Llopis
* Vicent Cubells

View File

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

View File

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

View File

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