def test_fromElementConfigureSetBadFormType(self):

        xml = """
        <iq type='set' to='pubsub.example.org'
                       from='user@example.org'>
          <pubsub xmlns='http://jabber.org/protocol/pubsub#owner'>
            <configure node='test'>
              <x xmlns='jabber:x:data' type='result'>
                <field var='FORM_TYPE' type='hidden'>
                  <value>http://jabber.org/protocol/pubsub#node_config</value>
                </field>
                <field var='pubsub#deliver_payloads'><value>0</value></field>
                <field var='x-myfield'><value>1</value></field>
              </x>
            </configure>
          </pubsub>
        </iq>
        """

        err = self.assertRaises(error.StanzaError,
                                pubsub.PubSubRequest.fromElement,
                                parseXml(xml))
        self.assertEqual('bad-request', err.condition)
        self.assertEqual("Unexpected form type 'result'", err.text)
        self.assertEqual(None, err.appCondition)
The form of a node configuraton set request should have the right type.
dataset/ETHPy150Open ralphm/wokkel/wokkel/test/test_pubsub.py/PubSubRequestTest.test_fromElementConfigureSetBadFormType