Make it possible to serialize as unicode in SEDA export adapter
This is useful in tests because the doctest comparison engine from lxml works better with text objects. The new _encoding argument is essentially used a "encoding" argument of lxml's etree.tostring() which will hence serialize to a unicode string. When doing so, we must also avoid any XML declaration (otherwise, lxml messes up when loading the content, not sure why), so we insert the "standalone" flag only when dumping to bytes.
Showing with 12 additions and 3 deletions