diff --git a/pylti/__init__.py b/pylti/__init__.py index 34216af..1e53832 100644 --- a/pylti/__init__.py +++ b/pylti/__init__.py @@ -3,4 +3,4 @@ PyLTI is module that implements IMS LTI in python The API uses decorators to wrap function with LTI functionality. """ -VERSION = "0.1.1" +VERSION = "0.1.3" # pragma: no cover diff --git a/pylti/common.py b/pylti/common.py index 108d384..2a25419 100644 --- a/pylti/common.py +++ b/pylti/common.py @@ -8,8 +8,7 @@ import oauth2 import oauth.oauth as oauth -from lxml import etree - +from xml.etree import ElementTree as etree log = logging.getLogger('pylti.common') # pylint: disable=invalid-name @@ -282,6 +281,8 @@ def generate_request_xml(message_identifier_id, operation, language.text = 'en' text_string = etree.SubElement(result_score, 'textString') text_string.text = score.__str__() + ret = "\n{}".format( + etree.tostring(root, encoding='utf-8')) log.debug("XML Response: \n{}".format( - etree.tostring(root, xml_declaration=True, encoding='utf-8'))) - return etree.tostring(root, xml_declaration=True, encoding='utf-8') + ret)) + return ret diff --git a/requirements.txt b/requirements.txt index 9d63603..02df0c9 100644 --- a/requirements.txt +++ b/requirements.txt @@ -10,4 +10,4 @@ pytest-cache==1.0 pytest-cov==1.8.0 pytest-flakes==0.2 pytest-pep8==1.0.6 - +httplib2==0.9 diff --git a/setup.py b/setup.py index da3309b..e880934 100644 --- a/setup.py +++ b/setup.py @@ -64,7 +64,7 @@ def run_tests(self): "oauthlib>=0.6.3", "semantic_version>=2.3.1"], cmdclass={"test": PyTest}, install_requires=["oauth>=1.0.1", "oauth2>=1.5.211", - "lxml>=3.4.0", ], + "httplib2>=0.9" ], include_package_data=True, zip_safe=False) except ImportError: