[MIG] html_text: Migration to 15.0
parent
184b6d4e1c
commit
e21db2d290
|
@ -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
|
||||
|
|
|
@ -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, "
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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)
|
||||
|
|
Loading…
Reference in New Issue