File: No-validation-in-tests.patch

package info (click to toggle)
python-sepaxml 2.7.0%2Bdfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 352 kB
  • sloc: python: 4,226; makefile: 4
file content (25 lines) | stat: -rw-r--r-- 826 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
From: Bastian Germann <bage@debian.org>
Date: Sat, 3 Jun 2023 15:58:36 +0200
Forwarded: not-needed
Subject: No validation in tests

---
 tests/utils.py | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

diff --git a/tests/utils.py b/tests/utils.py
index b2a4688..3e73d36 100644
--- a/tests/utils.py
+++ b/tests/utils.py
@@ -7,10 +7,7 @@ from sepaxml import validation
 
 
 def validate_xml(xmlout, schema):
-    with open(os.path.join(os.path.dirname(validation.__file__), 'schemas', schema + '.xsd'), 'rb') as schema_file:
-        schema_xml = schema_file.read()
-    schema_root = etree.XML(schema_xml)
-    schema = etree.XMLSchema(schema_root)
+    schema = None
     parser = etree.XMLParser(schema=schema)
     xml_root = etree.fromstring(xmlout, parser)
     return etree.tostring(xml_root, pretty_print=True)