Skip to content

Commit

Permalink
add lxml + add workaround for #7
Browse files Browse the repository at this point in the history
  • Loading branch information
HLFH committed Nov 2, 2022
1 parent f61264f commit de5737a
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 7 deletions.
7 changes: 4 additions & 3 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
Flask>=1.1.1
Flask==2.0.3
Werkzeug>=0.16.0
Flask-SQLAlchemy>=2.4.1
Flask-SQLAlchemy==2.5.1
SQLAlchemy>=1.3.11
alembic>=1.3.1
Flask-Migrate>=2.5.2
Flask-Migrate==2.5.2
ldap3>=2.6
lxml>=4.9.1
9 changes: 5 additions & 4 deletions tests/test_outlook.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
automua™ is a trademark of "Gaspard d'Hautefeuille" and may not be used
by third parties without the prior written permission of the author.
Copyright © 2022 Gaspard d'Hautefeuille: replace ElementTree XML API by lxml, and ParseError by XMLSyntaxError
Copyright © 2019-2022 Ralph Seichter
This file is part of automua.
Expand All @@ -21,9 +22,9 @@
"""
import unittest
from typing import List
from xml.etree.ElementTree import Element
from xml.etree.ElementTree import ParseError
from xml.etree.ElementTree import fromstring
from lxml.etree import Element
from lxml.etree import XMLSyntaxError
from lxml.etree import fromstring

from automua.generators.outlook import NS_RESPONSE_PAYLOAD
from automua.database import EGGS_DOMAIN
Expand Down Expand Up @@ -62,7 +63,7 @@ def smtp_server_elements(self, element: Element) -> List[Element]:

def test_ms_empty_post(self):
with self.app:
with self.assertRaises(ParseError):
with self.assertRaises(XMLSyntaxError):
self.post(MSOFT_CONFIG_ROUTE, data=None, content_type=CONTENT_TYPE_XML)

def test_ms_partial_post(self):
Expand Down

0 comments on commit de5737a

Please sign in to comment.