summaryrefslogtreecommitdiff
path: root/conn_tests
diff options
context:
space:
mode:
authorNathan Fritz <nathan@andyet.net>2010-05-11 12:21:02 -0700
committerNathan Fritz <nathan@andyet.net>2010-05-11 12:21:02 -0700
commit9d76e7353a9654d20be617e12fbaf329b5908794 (patch)
treef958047c34e783127b6445c439f603c77108cba9 /conn_tests
parent2f8c1954f0be9594720eb7637188290cefaaec7d (diff)
parentd40e49397bab4836353cff821359063663dcc2b3 (diff)
downloadslixmpp-9d76e7353a9654d20be617e12fbaf329b5908794.tar.gz
slixmpp-9d76e7353a9654d20be617e12fbaf329b5908794.tar.bz2
slixmpp-9d76e7353a9654d20be617e12fbaf329b5908794.tar.xz
slixmpp-9d76e7353a9654d20be617e12fbaf329b5908794.zip
Merge branch 'master' of git@github.com:fritzy/SleekXMPP
Diffstat (limited to 'conn_tests')
-rw-r--r--conn_tests/test_pubsubserver.py22
1 files changed, 20 insertions, 2 deletions
diff --git a/conn_tests/test_pubsubserver.py b/conn_tests/test_pubsubserver.py
index c9ff900e..7e5b57b0 100644
--- a/conn_tests/test_pubsubserver.py
+++ b/conn_tests/test_pubsubserver.py
@@ -109,8 +109,26 @@ class TestPubsubServer(unittest.TestCase):
self.failUnless(self.xmpp2['xep_0060'].unsubscribe(self.pshost, "testnode2"), "Got error response when unsubscribing.")
def test011createcollectionnode(self):
- "Create a collection node"
- self.failUnless(self.xmpp1['xep_0060'].create_node(self.pshost, "testnode3", self.statev['defaultconfig'], True), "Could not create collection node")
+ "Create a collection node w/ Account #2"
+ self.failUnless(self.xmpp2['xep_0060'].create_node(self.pshost, "testnode3", self.statev['defaultconfig'], True), "Could not create collection node")
+
+ def test012subscribecollection(self):
+ "Subscribe Account #1 to collection"
+ self.failUnless(self.xmpp1['xep_0060'].subscribe(self.pshost, "testnode3"))
+
+ def test013assignnodetocollection(self):
+ "Assign node to collection"
+ self.failUnless(self.xmpp2['xep_0060'].addNodeToCollection(self.pshost, 'testnode2', 'testnode3'))
+
+ def test014publishcollection(self):
+ """Publishing item to collection child"""
+ item = ET.Element('{http://netflint.net/protocol/test}test')
+ w = Waiter('wait publish2', StanzaPath('message/pubsub_event/items@node=testnode2'))
+ self.xmpp1.registerHandler(w)
+ result = self.xmpp2['xep_0060'].setItem(self.pshost, "testnode2", (('test2', item),))
+ msg = w.wait(5) # got to get a result in 5 seconds
+ self.failUnless(msg != False, "Account #1 did not get message event: perhaps node was advertised incorrectly?")
+ self.failUnless(result)
def test900cleanup(self):
"Cleaning up"