Update XEP-0085 plugin to work with both ElementTree and cElementTree
Each state element must have its own stanza class now. A stanza class with an empty name field causes errors in ElementTree, even though it works fine with cElementTree.
This commit is contained in:
@@ -4,7 +4,11 @@ import sleekxmpp.plugins.xep_0085 as xep_0085
|
||||
class TestChatStates(SleekTest):
|
||||
|
||||
def setUp(self):
|
||||
register_stanza_plugin(Message, xep_0085.ChatState)
|
||||
register_stanza_plugin(Message, xep_0085.stanza.Active)
|
||||
register_stanza_plugin(Message, xep_0085.stanza.Composing)
|
||||
register_stanza_plugin(Message, xep_0085.stanza.Gone)
|
||||
register_stanza_plugin(Message, xep_0085.stanza.Inactive)
|
||||
register_stanza_plugin(Message, xep_0085.stanza.Paused)
|
||||
|
||||
def testCreateChatState(self):
|
||||
"""Testing creating chat states."""
|
||||
|
Reference in New Issue
Block a user