'Test getting the feature from an unsupported error'

def testPubsubUnsupportedError(self):

    iq = self.Iq()
    iq['error']['type'] = 'cancel'
    iq['error']['code'] = '501'
    iq['error']['condition'] = 'feature-not-implemented'
    iq['error']['pubsub']['condition'] = 'unsupported'
    iq['error']['pubsub']['unsupported'] = 'instant-node'
    self.check(iq, '\n                                        <iq    type="error">\n                                                <error    type="cancel"    code="501">\n                                                        <feature-not-implemented    xmlns="urn:ietf:params:xml:ns:xmpp-stanzas"    />\n                                                        <unsupported    xmlns="http://jabber.org/protocol/pubsub#errors"    feature="instant-node"    />\n                                                </error>\n                                        </iq>\n                                ', use_values=False)
    self.assertEqual(iq['error']['pubsub']['condition'], 'unsupported')
    self.assertEqual(iq['error']['pubsub']['unsupported'], 'instant-node')
    del iq['error']['pubsub']['unsupported']
    self.check(iq, '\n                                        <iq    type="error">\n                                                <error    type="cancel"    code="501">\n                                                        <feature-not-implemented    xmlns="urn:ietf:params:xml:ns:xmpp-stanzas"    />\n                                                </error>\n                                        </iq>\n                                ', use_values=False)
