summaryrefslogtreecommitdiff
path: root/tests/test_stream_presence.py
diff options
context:
space:
mode:
authorLance Stout <lancestout@gmail.com>2010-11-17 02:00:20 -0500
committerLance Stout <lancestout@gmail.com>2010-11-17 02:01:12 -0500
commit26aca2b789f62123819041229ba40ab10268f49e (patch)
tree20388fb0559ed85f7143eb3b8a669142cdc43f6b /tests/test_stream_presence.py
parent4f69a03bb1a8caab7899bd04f97b7975a78f2f34 (diff)
parent5424ede413393db5b835686e8544a9b703fb113b (diff)
downloadslixmpp-26aca2b789f62123819041229ba40ab10268f49e.tar.gz
slixmpp-26aca2b789f62123819041229ba40ab10268f49e.tar.bz2
slixmpp-26aca2b789f62123819041229ba40ab10268f49e.tar.xz
slixmpp-26aca2b789f62123819041229ba40ab10268f49e.zip
Merge branch 'roster' of github.com:fritzy/SleekXMPP into roster
Conflicts: sleekxmpp/basexmpp.py sleekxmpp/roster.py sleekxmpp/test/sleektest.py tests/test_stream_presence.py tests/test_stream_roster.py
Diffstat (limited to 'tests/test_stream_presence.py')
-rw-r--r--tests/test_stream_presence.py28
1 files changed, 14 insertions, 14 deletions
diff --git a/tests/test_stream_presence.py b/tests/test_stream_presence.py
index b259495e..3e0933d7 100644
--- a/tests/test_stream_presence.py
+++ b/tests/test_stream_presence.py
@@ -29,10 +29,10 @@ class TestStreamPresence(SleekTest):
self.xmpp.add_event_handler('got_offline', got_offline)
self.xmpp.add_event_handler('presence_unavailable', unavailable)
- self.stream_recv("""
- <presence from="otheruser@localhost"
- to="tester@localhost"
- type="unavailable" />
+ self.recv("""
+ <presence type="unavailable"
+ from="otheruser@localhost"
+ to="tester@localhost"/>
""")
# Give event queue time to process.
@@ -56,7 +56,7 @@ class TestStreamPresence(SleekTest):
#
# We use the stream to initialize the roster to make
# the test independent of the roster implementation.
- self.stream_recv("""
+ self.recv("""
<iq type="set">
<query xmlns="jabber:iq:roster">
<item jid="otheruser@localhost"
@@ -69,13 +69,13 @@ class TestStreamPresence(SleekTest):
""")
# Contact comes online.
- self.stream_recv("""
+ self.recv("""
<presence from="otheruser@localhost/foobar"
to="tester@localhost" />
""")
# Contact goes offline, should trigger got_offline.
- self.stream_recv("""
+ self.recv("""
<presence from="otheruser@localhost/foobar"
to="tester@localhost"
type="unavailable" />
@@ -102,7 +102,7 @@ class TestStreamPresence(SleekTest):
self.xmpp.add_event_handler('presence_available', presence_available)
self.xmpp.add_event_handler('got_online', got_online)
- self.stream_recv("""
+ self.recv("""
<presence from="user@localhost"
to="tester@localhost" />
""")
@@ -140,22 +140,22 @@ class TestStreamPresence(SleekTest):
self.xmpp.auto_authorize = True
self.xmpp.auto_subscribe = True
- self.stream_recv("""
+ self.recv("""
<presence from="user@localhost"
to="tester@localhost"
type="subscribe" />
""")
- self.stream_send_presence("""
+ self.send("""
<presence to="user@localhost"
type="subscribed" />
""")
- self.stream_send_presence("""
+ self.send("""
<presence to="user@localhost" />
""")
- self.stream_send_presence("""
+ self.send("""
<presence to="user@localhost"
type="subscribe" />
""")
@@ -185,13 +185,13 @@ class TestStreamPresence(SleekTest):
# With this setting we should reject all subscriptions.
self.xmpp.roster['tester@localhost'].auto_authorize = False
- self.stream_recv("""
+ self.recv("""
<presence from="user@localhost"
to="tester@localhost"
type="subscribe" />
""")
- self.stream_send_presence("""
+ self.send("""
<presence to="user@localhost"
type="unsubscribed" />
""")