'Compare the result of calling tostring against an
expected result.'

def tryTostring(self, original='', expected=None, message='', **kwargs):

    if (not expected):
        expected = original
    if isinstance(original, str):
        xml = ET.fromstring(original)
    else:
        xml = original
    result = tostring(xml, **kwargs)
    self.failUnless((result == expected), ('%s:    %s' % (message, result)))
