tests: pass open file to etree.parse() in cityweb tests

This commit is contained in:
Frédéric Péters 2019-02-27 09:33:03 +01:00
parent 08900c4537
commit 560fe4406a
1 changed files with 1 additions and 1 deletions

View File

@ -67,7 +67,7 @@ def payload(request):
def assert_xml_doc(archive, assertions):
schema = etree.XMLSchema(
etree.parse(os.path.join(get_test_base_dir('cityweb'), 'cityweb.xsd')))
etree.parse(open(os.path.join(get_test_base_dir('cityweb'), 'cityweb.xsd'))))
with zipfile.ZipFile(archive) as zfd:
content = zfd.read(zfd.filelist[0].filename)
xml_content = etree.fromstring(content)