forked from ralphm/wokkel
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Correctly report disco identity for PubSubService without PubSubResou…
…rce. Author: ralphm. Fixes #64.
- Loading branch information
Showing
2 changed files
with
22 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3156,6 +3156,23 @@ def setUp(self): | |
self.service.send = self.stub.xmlstream.send | ||
|
||
|
||
def test_getDiscoInfo(self): | ||
""" | ||
Test getDiscoInfo calls getNodeInfo and returns some minimal info. | ||
""" | ||
def cb(info): | ||
discoInfo = disco.DiscoInfo() | ||
for item in info: | ||
discoInfo.append(item) | ||
self.assertIn(('pubsub', 'service'), discoInfo.identities) | ||
self.assertIn(disco.NS_DISCO_ITEMS, discoInfo.features) | ||
|
||
d = self.service.getDiscoInfo(JID('[email protected]/home'), | ||
JID('pubsub.example.org'), '') | ||
d.addCallback(cb) | ||
return d | ||
|
||
|
||
def test_publish(self): | ||
""" | ||
Non-overridden L{PubSubService.publish} yields unsupported error. | ||
|