summaryrefslogtreecommitdiff
path: root/conn_tests/test_pubsubserver.py
diff options
context:
space:
mode:
authorNathan Fritz <nathan@andyet.net>2010-04-19 01:03:27 -0700
committerNathan Fritz <nathan@andyet.net>2010-04-19 01:03:27 -0700
commit212660091f155255ee9f45cdfca7969d8313309c (patch)
treed796fe3a72f834f06fda39a4b5d784eea7e3ec5c /conn_tests/test_pubsubserver.py
parent35c157f9d8c9bb2f59d17ec68b771ffcffb7931d (diff)
downloadslixmpp-212660091f155255ee9f45cdfca7969d8313309c.tar.gz
slixmpp-212660091f155255ee9f45cdfca7969d8313309c.tar.bz2
slixmpp-212660091f155255ee9f45cdfca7969d8313309c.tar.xz
slixmpp-212660091f155255ee9f45cdfca7969d8313309c.zip
added pubsub tests and fixed match on iterator error
Diffstat (limited to 'conn_tests/test_pubsubserver.py')
-rw-r--r--conn_tests/test_pubsubserver.py12
1 files changed, 12 insertions, 0 deletions
diff --git a/conn_tests/test_pubsubserver.py b/conn_tests/test_pubsubserver.py
index 80b86e46..1750636f 100644
--- a/conn_tests/test_pubsubserver.py
+++ b/conn_tests/test_pubsubserver.py
@@ -66,8 +66,20 @@ class TestPubsubServer(unittest.TestCase):
#print("%s == %s" % (nconfig.getValues(), self.statev['defaultconfig'].getValues()))
self.failUnless(nconfig.getValues() == self.statev['defaultconfig'].getValues(), "Configuration does not match")
self.failUnless(self.xmpp1['xep_0060'].setNodeConfig(self.pshost, 'testnode2', nconfig))
+
+ def test006subscribetonode(self):
+ """Subscribe to node from account 2"""
+ self.failUnless(self.xmpp2['xep_0060'].subscribe(self.pshost, "testnode2"))
+
+ def test007publishitem(self):
+ """Publishing item"""
+ item = ET.Element('{http://netflint.net/protocol/test}test')
+ result = self.xmpp1['xep_0060'].setItem(self.pshost, "testnode2", (('test_node1', item),))
+ self.failUnless(result)
+ #need to add check for update
def test999cleanup(self):
+ "Cleaning up"
self.failUnless(self.xmpp1['xep_0060'].deleteNode(self.pshost, 'testnode2'))