Changeset 47:895c67e2ed9f


Ignore:
Timestamp:
Jan 12, 2009, 5:59:36 PM (12 years ago)
Author:
Ralph Meijer <ralphm@…>
Branch:
default
Convert:
svn:b33ecbfc-034c-dc11-8662-000475d9059e/trunk@154
Message:

Track namespace constant name change in disco module and add minimal test.

Author: ralphm.

Location:
wokkel
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • wokkel/pubsub.py

    r43 r47  
    543543            info.append(disco.DiscoIdentity(**self.discoIdentity))
    544544
    545             info.append(disco.DiscoFeature(disco.NS_ITEMS))
     545            info.append(disco.DiscoFeature(disco.NS_DISCO_ITEMS))
    546546            info.extend([disco.DiscoFeature("%s#%s" % (NS_PUBSUB, feature))
    547547                         for feature in self.pubSubFeatures])
  • wokkel/test/test_pubsub.py

    r46 r47  
    506506        """
    507507        verify.verifyObject(iwokkel.IPubSubService, self.service)
     508
     509
     510    def test_getDiscoInfo(self):
     511        """
     512        Test getDiscoInfo calls getNodeInfo and returns some minimal info.
     513        """
     514        def cb(info):
     515            self.assertEqual(2, len(info))
     516
     517        def getNodeInfo(requestor, target, nodeIdentifier):
     518            return defer.succeed(None)
     519
     520        self.service.getNodeInfo = getNodeInfo
     521        d = self.service.getDiscoInfo(JID('user@example.org/home'),
     522                                      JID('pubsub.example.org'), '')
     523        d.addCallback(cb)
     524        return d
    508525
    509526
Note: See TracChangeset for help on using the changeset viewer.