Merge branch 'master' of github.com:fritzy/SleekXMPP
This commit is contained in:
commit
f159328dc4
2 changed files with 14 additions and 12 deletions
|
@ -15,7 +15,6 @@ class Presence(RootStanza):
|
|||
return self.xml.find("{%s}show" % self.namespace)
|
||||
|
||||
def setType(self, value):
|
||||
if value in self.types:
|
||||
show = self.getShowElement()
|
||||
if value in self.types:
|
||||
if show is not None:
|
||||
|
@ -26,6 +25,7 @@ class Presence(RootStanza):
|
|||
elif value in self.showtypes:
|
||||
if show is None:
|
||||
show = ET.Element("{%s}show" % self.namespace)
|
||||
self.xml.append(show)
|
||||
show.text = value
|
||||
return self
|
||||
|
||||
|
|
|
@ -16,6 +16,7 @@ class testoverall(unittest.TestCase):
|
|||
"""Invoking the tabnanny"""
|
||||
import tabnanny
|
||||
self.failIf(tabnanny.check("." + os.sep + 'sleekxmpp'))
|
||||
#raise "Help!"
|
||||
|
||||
def testMethodLength(self):
|
||||
"""Testing for excessive method lengths"""
|
||||
|
@ -62,4 +63,5 @@ if __name__ == '__main__':
|
|||
#sys.modules[modname].config = moduleconfig
|
||||
alltests.append(sys.modules[modname].suite)
|
||||
alltests_suite = unittest.TestSuite(alltests)
|
||||
unittest.TextTestRunner(verbosity=2).run(alltests_suite)
|
||||
result = unittest.TextTestRunner(verbosity=2).run(alltests_suite)
|
||||
print("""<tests xmlns='http://andyet.net/protocol/tests' ran='%s' errors='%s' fails='%s' success='%s' />""" % (result.testsRun, len(result.errors), len(result.failures), result.wasSuccessful()))
|
||||
|
|
Loading…
Reference in a new issue