Пример #1
0
 def test_makeServiceVerbose(self):
     """
     The verbose flag enables traffic logging.
     """
     opt = tap.Options()
     opt.parseOptions(['--verbose'])
     s = tap.makeService(opt)
     factory = s.args[1]
     self.assertTrue(factory.logTraffic)
Пример #2
0
 def test_makeServiceVerbose(self):
     """
     The verbose flag enables traffic logging.
     """
     opt = tap.Options()
     opt.parseOptions(['--verbose'])
     s = tap.makeService(opt)
     factory = s.args[1]
     self.assertTrue(factory.logTraffic)
Пример #3
0
 def test_makeService(self):
     """
     The service gets set up with a router and factory.
     """
     opt = tap.Options()
     opt.parseOptions([])
     s = tap.makeService(opt)
     self.assertIsInstance(s, internet.TCPServer)
     self.assertEquals('127.0.0.1', s.kwargs['interface'])
     self.assertEquals(2, len(s.args))
     self.assertEquals(5347, s.args[0])
     factory = s.args[1]
     self.assertIsInstance(factory, component.XMPPComponentServerFactory)
     self.assertIsInstance(factory.router, component.Router)
     self.assertEquals('secret', factory.secret)
     self.assertFalse(factory.logTraffic)
Пример #4
0
 def test_makeService(self):
     """
     The service gets set up with a router and factory.
     """
     opt = tap.Options()
     opt.parseOptions([])
     s = tap.makeService(opt)
     self.assertIsInstance(s, internet.TCPServer)
     self.assertEquals('127.0.0.1', s.kwargs['interface'])
     self.assertEquals(2, len(s.args))
     self.assertEquals(5347, s.args[0])
     factory = s.args[1]
     self.assertIsInstance(factory, component.XMPPComponentServerFactory)
     self.assertIsInstance(factory.router, component.Router)
     self.assertEquals('secret', factory.secret)
     self.assertFalse(factory.logTraffic)