'Set up the XML Stream to have a SASL feature with the given mechanism.'

def _setMechanism(self, name):

    feature = domish.Element((NS_XMPP_SASL, 'mechanisms'))
    feature.addElement('mechanism', content=name)
    self.xmlstream.features[(feature.uri, feature.name)] = feature
    self.init.setMechanism()
    return self.init.mechanism.name
