Corrected test errors.

There was a bug in the XML compare method.
This commit is contained in:
Lance Stout
2010-10-07 19:42:28 -04:00
parent 42bfca1c87
commit e02ffe8547
6 changed files with 23 additions and 9 deletions

View File

@@ -78,7 +78,9 @@ class Presence(RootStanza):
Arguments:
show -- Must be one of: away, chat, dnd, or xa.
"""
if show in self.showtypes:
if show is None:
self._delSub('show')
elif show in self.showtypes:
self._setSubText('show', text=show)
return self
@@ -99,6 +101,14 @@ class Presence(RootStanza):
self['show'] = value
return self
def delType(self):
"""
Remove both the type attribute and the <show> element.
"""
self._delAttr('type')
self._delSub('show')
def setPriority(self, value):
"""
Set the entity's priority value. Some server use priority to