website: Improve XML handling and x-amz-website-redirect-location tests

Signed-off-by: Robin H. Johnson <robbat2@gentoo.org>
This commit is contained in:
Robin H. Johnson 2016-01-26 00:22:51 +00:00 committed by Robin H. Johnson
parent e0655234b1
commit 88b6328003
2 changed files with 76 additions and 24 deletions

View file

@ -257,6 +257,10 @@ def with_setup_kwargs(setup, teardown=None):
# yield _test_gen, '1'
# yield _test_gen
def trim_xml(xml_str):
p = etree.XMLParser(remove_blank_text=True)
elem = etree.XML(xml_str, parser=p)
return etree.tostring(elem)
def normalize_xml(xml, pretty_print=True):
if xml is None: