Пример #1
0
Файл: disco.py Проект: dax/jcl
 def setUp(self):
     JCLTestCase.setUp(self, tables=[User, Account, ExampleAccount])
     self.comp = JCLComponent("jcl.test.com",
                              "password",
                              "localhost",
                              "5347",
                              self.db_url)
     self.comp.account_manager.account_classes = (ExampleAccount,)
     self.handler = AccountTypeDiscoGetItemsHandler(self.comp)
Пример #2
0
Файл: disco.py Проект: dax/jcl
class AccountTypeDiscoGetItemsHandler_TestCase (JCLTestCase):
    """Test AccountTypeDiscoGetItemsHandler class"""
    def setUp(self):
        JCLTestCase.setUp(self, tables=[User, Account, ExampleAccount])
        self.comp = JCLComponent("jcl.test.com",
                                 "password",
                                 "localhost",
                                 "5347",
                                 self.db_url)
        self.comp.account_manager.account_classes = (ExampleAccount,)
        self.handler = AccountTypeDiscoGetItemsHandler(self.comp)

    def test_handler_unknown_account_type(self):
        """Test handler with an unknown account type"""
        self.assertEquals(self.handler.handle(Message(from_jid="*****@*****.**"),
                                              None, None, None,
                                              "Unknown"), [])