'Entity expansion can be used to cause large memory usage after
deserialization for little memory usage from the attacker.
See https://pypi.python.org/pypi/defusedxml for more information.'

def test_unsafe_xml(self):

    serializer = Serializer()
    data = '<!DOCTYPE    bomb    [<!ENTITY    a    "evil    chars">]>\n                                <bomb>&a;</bomb>\n                                '
    self.assertRaises(BadRequest, serializer.from_xml, data)
