'Get an etree if possible.'

def xml(self):

    if ('xml' not in self.mimetype):
        raise AttributeError(('Not    a    XML    response    (Content-Type:    %s)' % self.mimetype))
    for module in ['xml.etree.ElementTree', 'ElementTree', 'elementtree.ElementTree']:
        etree = import_string(module, silent=True)
        if (etree is not None):
            return etree.XML(self.body)
    raise RuntimeError('You    must    have    ElementTree    installed    to    use    TestResponse.xml')
