Some disco tests
darcs-hash:20061009173747-86b55-901520cbbadae2bb8dc2129e6f882bdbacb2d799.gz
This commit is contained in:
@@ -196,6 +196,28 @@ class JCLComponent_TestCase(unittest.TestCase):
|
|||||||
if presence.get_to_jid() == "test2@test.com"]), \
|
if presence.get_to_jid() == "test2@test.com"]), \
|
||||||
2)
|
2)
|
||||||
|
|
||||||
|
def test_signal_handler(self):
|
||||||
|
self.comp.running = True
|
||||||
|
self.comp.signal_handler(42, None)
|
||||||
|
self.assertFalse(self.comp.running)
|
||||||
|
|
||||||
|
def test_disco_get_info(self):
|
||||||
|
disco_info = self.comp.disco_get_info(None, None)
|
||||||
|
self.assertTrue(disco_info.has_feature("jabber:iq:version"))
|
||||||
|
self.assertTrue(disco_info.has_feature("jabber:iq:register"))
|
||||||
|
|
||||||
|
def test_disco_get_info_node(self):
|
||||||
|
disco_info = self.comp.disco_get_info("node_test", None)
|
||||||
|
self.assertFalse(disco_info.has_feature("jabber:iq:version"))
|
||||||
|
self.assertTrue(disco_info.has_feature("jabber:iq:register"))
|
||||||
|
|
||||||
|
def test_disco_get_items(self):
|
||||||
|
account.hub.threadConnection = connectionForURI('sqlite://' + DB_URL)
|
||||||
|
account1 = Account(user_jid = "user1@test.com", \
|
||||||
|
name = "account1", \
|
||||||
|
jid = "account1@jcl.test.com")
|
||||||
|
del account.hub.threadConnection
|
||||||
|
|
||||||
def test_get_reg_form(self):
|
def test_get_reg_form(self):
|
||||||
self.comp.get_reg_form(Lang.en, Account)
|
self.comp.get_reg_form(Lang.en, Account)
|
||||||
self.assertTrue(True)
|
self.assertTrue(True)
|
||||||
@@ -207,12 +229,6 @@ class JCLComponent_TestCase(unittest.TestCase):
|
|||||||
self.comp.get_reg_form_init(Lang.en, account1)
|
self.comp.get_reg_form_init(Lang.en, account1)
|
||||||
self.assertTrue(True)
|
self.assertTrue(True)
|
||||||
|
|
||||||
def test_disco_get_info(self):
|
|
||||||
pass
|
|
||||||
|
|
||||||
def test_disco_get_items(self):
|
|
||||||
pass
|
|
||||||
|
|
||||||
def test_handle_get_version(self):
|
def test_handle_get_version(self):
|
||||||
pass
|
pass
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user