xmlstream/stanzabase: remove unused interfaces and types attributes
These are already on each stanza, and were not applicable to all stanzas anyway. Signed-off-by: Maxime “pep” Buquet <pep@bouah.net>
This commit is contained in:
parent
371ad20ca7
commit
d50d996c68
2 changed files with 0 additions and 16 deletions
|
@ -1374,14 +1374,6 @@ class StanzaBase(ElementBase):
|
||||||
#: The default XMPP client namespace
|
#: The default XMPP client namespace
|
||||||
namespace = 'jabber:client'
|
namespace = 'jabber:client'
|
||||||
|
|
||||||
#: There is a small set of attributes which apply to all XMPP stanzas:
|
|
||||||
#: the stanza type, the to and from JIDs, the stanza ID, and, especially
|
|
||||||
#: in the case of an Iq stanza, a payload.
|
|
||||||
interfaces = {'type', 'to', 'from', 'id', 'payload'}
|
|
||||||
|
|
||||||
#: A basic set of allowed values for the ``'type'`` interface.
|
|
||||||
types = {'get', 'set', 'error', None, 'unavailable', 'normal', 'chat'}
|
|
||||||
|
|
||||||
def __init__(self, stream=None, xml=None, stype=None,
|
def __init__(self, stream=None, xml=None, stype=None,
|
||||||
sto=None, sfrom=None, sid=None, parent=None):
|
sto=None, sfrom=None, sid=None, parent=None):
|
||||||
self.stream = stream
|
self.stream = stream
|
||||||
|
|
|
@ -68,13 +68,5 @@ class TestStanzaBase(SlixTest):
|
||||||
self.assertTrue(stanza['payload'] == [],
|
self.assertTrue(stanza['payload'] == [],
|
||||||
"Stanza reply did not empty stanza payload.")
|
"Stanza reply did not empty stanza payload.")
|
||||||
|
|
||||||
def testError(self):
|
|
||||||
"""Test marking a stanza as an error."""
|
|
||||||
stanza = StanzaBase()
|
|
||||||
stanza['type'] = 'get'
|
|
||||||
stanza.error()
|
|
||||||
self.assertTrue(stanza['type'] == 'error',
|
|
||||||
"Stanza type is not 'error' after calling error()")
|
|
||||||
|
|
||||||
|
|
||||||
suite = unittest.TestLoader().loadTestsFromTestCase(TestStanzaBase)
|
suite = unittest.TestLoader().loadTestsFromTestCase(TestStanzaBase)
|
||||||
|
|
Loading…
Reference in a new issue