-
-
Notifications
You must be signed in to change notification settings - Fork 314
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by simahawk
- Loading branch information
Showing
4 changed files
with
19 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,9 +2,8 @@ | |
# @author: Simone Orsi <[email protected]> | ||
# License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl). | ||
|
||
from odoo.addons.component.tests.common import SavepointComponentCase | ||
|
||
from .common import XMLTestCaseMixin | ||
from .common import XMLComponentTestCase | ||
|
||
TEST_XML = """<?xml version="1.0" encoding="UTF-8"?> | ||
<xs:element | ||
|
@@ -15,17 +14,7 @@ | |
""" | ||
|
||
|
||
class XMLTestCase(SavepointComponentCase, XMLTestCaseMixin): | ||
@classmethod | ||
def setUpClass(cls): | ||
super().setUpClass() | ||
cls.backend = cls.env.ref("edi_oca.demo_edi_backend") | ||
cls.handler = cls.backend._find_component( | ||
cls.backend._name, | ||
["edi.xml"], | ||
work_ctx={"schema_path": "edi_xml_oca:tests/fixtures/Test.xsd"}, | ||
) | ||
|
||
class XMLTestCase(XMLComponentTestCase): | ||
def test_xml_schema_fail(self): | ||
with self.assertRaises(ValueError): | ||
self.backend._find_component( | ||
|