italia / spid-testenv2

New test Identity Provider for SPID
GNU Affero General Public License v3.0
35 stars 38 forks source link

saml_to_dict fault prevention + Stupid Metadata TestCase #317

Closed peppelinux closed 3 years ago

peppelinux commented 3 years ago

This PR solves an annoing problem that raises with faulty metadata.

The exception is handled but I noticed that in testenv.utils.saml_to_dict function the xmlstr passed by unit tests, sometimes is bytes and sometimes is '_io.TextIOWrapper' object.

not a code to be proud of but "it just works", consider me ready for your revision!