Example #1
0
File: disco.py Project: 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.handler = DiscoHandler(self.comp)
Example #2
0
File: disco.py Project: dax/jcl
class DiscoHandler_TestCase(JCLTestCase):
    def setUp(self):
        JCLTestCase.setUp(self, tables=[User, Account, ExampleAccount])
        self.comp = JCLComponent("jcl.test.com",
                                 "password",
                                 "localhost",
                                 "5347",
                                 self.db_url)
        self.handler = DiscoHandler(self.comp)

    def test_default_filter(self):
        """Test default filter behavior"""
        self.assertFalse(self.handler.filter(None, None, None))

    def test_default_handler(self):
        """Test default handler: do nothing"""
        self.assertEquals(self.handler.handle(None, None, None, None, None),
                          None)