Ticket #27: pubsub.patch

File pubsub.patch, 2.0 KB (added by caedes, 13 years ago)

File fixing the pubsub errors, and the unit tests.

  • wokkel/test/test_pubsub.py

     
    179179        child = children[0]
    180180        self.assertEquals('test', child['node'])
    181181
     182        children = list(domish.generateElementsQNamed(iq.pubsub.children,
     183                                                      'configure', NS_PUBSUB))
     184        self.assertEquals(1, len(children))
     185
    182186        response = toResponse(iq, 'result')
    183187        self.stub.send(response)
    184188        return d
     
    245249        self.assertEquals('pubsub.example.org', iq.getAttribute('to'))
    246250        self.assertEquals('set', iq.getAttribute('type'))
    247251        self.assertEquals('pubsub', iq.pubsub.name)
    248         self.assertEquals(NS_PUBSUB, iq.pubsub.uri)
     252        self.assertEquals(NS_PUBSUB_OWNER, iq.pubsub.uri)
    249253        children = list(domish.generateElementsQNamed(iq.pubsub.children,
    250                                                       'delete', NS_PUBSUB))
     254                                                      'delete', NS_PUBSUB_OWNER))
    251255        self.assertEquals(1, len(children))
    252256        child = children[0]
    253257        self.assertEquals('test', child['node'])
  • wokkel/pubsub.py

     
    333333        @type nodeIdentifier: C{unicode}
    334334        """
    335335
    336 
    337336        request = _PubSubRequest(self.xmlstream, 'create')
     337        request.pubsub.addElement("configure")
    338338        if nodeIdentifier:
    339339            request.command['node'] = nodeIdentifier
    340340
     
    358358        @param nodeIdentifier: The identifier of the node.
    359359        @type nodeIdentifier: C{unicode}
    360360        """
    361         request = _PubSubRequest(self.xmlstream, 'delete')
     361        request = _PubSubRequest(self.xmlstream, 'delete', NS_PUBSUB_OWNER)
    362362        request.command['node'] = nodeIdentifier
    363363        return request.send(service)
    364364