mirror of
https://github.com/correl/SleekXMPP.git
synced 2024-11-30 19:19:55 +00:00
Update test_events to use SleekTest to make everything consistent.
This commit is contained in:
parent
7ad0143687
commit
5c9b47afbd
1 changed files with 4 additions and 8 deletions
|
@ -1,14 +1,11 @@
|
||||||
import unittest
|
import sleekxmpp
|
||||||
|
from sleektest import *
|
||||||
|
|
||||||
class testevents(unittest.TestCase):
|
|
||||||
|
|
||||||
def setUp(self):
|
class TestEvents(SleekTest):
|
||||||
import sleekxmpp.stanza.presence as p
|
|
||||||
self.p = p
|
|
||||||
|
|
||||||
def testEventHappening(self):
|
def testEventHappening(self):
|
||||||
"Test handler working"
|
"Test handler working"
|
||||||
import sleekxmpp
|
|
||||||
c = sleekxmpp.ClientXMPP('crap@wherever', 'password')
|
c = sleekxmpp.ClientXMPP('crap@wherever', 'password')
|
||||||
happened = []
|
happened = []
|
||||||
def handletestevent(event):
|
def handletestevent(event):
|
||||||
|
@ -20,7 +17,6 @@ class testevents(unittest.TestCase):
|
||||||
|
|
||||||
def testDelEvent(self):
|
def testDelEvent(self):
|
||||||
"Test handler working, then deleted and not triggered"
|
"Test handler working, then deleted and not triggered"
|
||||||
import sleekxmpp
|
|
||||||
c = sleekxmpp.ClientXMPP('crap@wherever', 'password')
|
c = sleekxmpp.ClientXMPP('crap@wherever', 'password')
|
||||||
happened = []
|
happened = []
|
||||||
def handletestevent(event):
|
def handletestevent(event):
|
||||||
|
@ -32,4 +28,4 @@ class testevents(unittest.TestCase):
|
||||||
self.failUnless(happened == [True], "event did not get triggered the correct number of times")
|
self.failUnless(happened == [True], "event did not get triggered the correct number of times")
|
||||||
|
|
||||||
|
|
||||||
suite = unittest.TestLoader().loadTestsFromTestCase(testevents)
|
suite = unittest.TestLoader().loadTestsFromTestCase(TestEvents)
|
||||||
|
|
Loading…
Reference in a new issue