Simplified SleekTest.
* check_stanza does not require stanza_class parameter. Introspection! * check_message, check_iq, and check_presence removed -- use check instead. * stream_send_stanza, stream_send_message, stream_send_iq, and stream_send_presence removed -- use send instead. * Use recv instead of recv_message, recv_presence, etc. * check_jid instead of check_JID * stream_start may accept multi=True to return a new SleekTest instance for testing multiple streams at once.
This commit is contained in:
@@ -26,13 +26,13 @@ class TestStreamExceptions(SleekTest):
|
||||
self.stream_start()
|
||||
self.xmpp.add_event_handler('message', message)
|
||||
|
||||
self.stream_recv("""
|
||||
self.recv("""
|
||||
<message>
|
||||
<body>This is going to cause an error.</body>
|
||||
</message>
|
||||
""")
|
||||
|
||||
self.stream_send_message("""
|
||||
self.send("""
|
||||
<message type="error">
|
||||
<error type="cancel">
|
||||
<feature-not-implemented
|
||||
@@ -57,13 +57,13 @@ class TestStreamExceptions(SleekTest):
|
||||
self.xmpp.add_event_handler('message', message,
|
||||
threaded=True)
|
||||
|
||||
self.stream_recv("""
|
||||
self.recv("""
|
||||
<message>
|
||||
<body>This is going to cause an error.</body>
|
||||
</message>
|
||||
""")
|
||||
|
||||
self.stream_send_message("""
|
||||
self.send("""
|
||||
<message type="error">
|
||||
<error type="cancel">
|
||||
<feature-not-implemented
|
||||
@@ -84,14 +84,14 @@ class TestStreamExceptions(SleekTest):
|
||||
self.stream_start()
|
||||
self.xmpp.add_event_handler('message', message)
|
||||
|
||||
self.stream_recv("""
|
||||
self.recv("""
|
||||
<message>
|
||||
<body>This is going to cause an error.</body>
|
||||
</message>
|
||||
""")
|
||||
|
||||
if sys.version_info < (3, 0):
|
||||
self.stream_send_message("""
|
||||
self.send("""
|
||||
<message type="error">
|
||||
<error type="cancel">
|
||||
<undefined-condition
|
||||
|
||||
Reference in New Issue
Block a user