From 26395d1f6319df652cc71769b6c3b23f6308b56b Mon Sep 17 00:00:00 2001 From: David Rousselie Date: Mon, 9 Oct 2006 19:37:47 +0200 Subject: [PATCH] Some disco tests darcs-hash:20061009173747-86b55-901520cbbadae2bb8dc2129e6f882bdbacb2d799.gz --- tests/jcl/jabber/test_component.py | 30 +++++++++++++++++++++++------- 1 file changed, 23 insertions(+), 7 deletions(-) diff --git a/tests/jcl/jabber/test_component.py b/tests/jcl/jabber/test_component.py index d40bef3..704642b 100644 --- a/tests/jcl/jabber/test_component.py +++ b/tests/jcl/jabber/test_component.py @@ -195,7 +195,29 @@ class JCLComponent_TestCase(unittest.TestCase): for presence in presence_sended \ if presence.get_to_jid() == "test2@test.com"]), \ 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): self.comp.get_reg_form(Lang.en, Account) self.assertTrue(True) @@ -207,12 +229,6 @@ class JCLComponent_TestCase(unittest.TestCase): self.comp.get_reg_form_init(Lang.en, account1) self.assertTrue(True) - def test_disco_get_info(self): - pass - - def test_disco_get_items(self): - pass - def test_handle_get_version(self): pass