Пример #1
0
 def setUp(self):
     IrcTkTestCase.setUp(self)
     obj = Mock()
     obj.SERVER = 'irc.voxinfinitus.net'
     obj.PORT = 6667
     obj.SSL = False
     obj.TIMEOUT = 300
     obj.NICK = 'hax0r'
     obj.REALNAME = 'A Python Bot'
     obj.CHANNELS = ['#voxinfinitus']
     self.obj = obj
Пример #2
0
 def setUp(self):
     IrcTkTestCase.setUp(self)
     obj = Mock()
     obj.SERVER = 'irc.voxinfinitus.net'
     obj.PORT = 6667
     obj.SSL = False
     obj.TIMEOUT = 300
     obj.NICK = 'hax0r'
     obj.REALNAME = 'A Python Bot'
     obj.CHANNELS = ['#voxinfinitus']
     self.obj = obj
Пример #3
0
    def setUp(self):
        IrcTkTestCase.setUp(self)

        self.min_workers = 3
        self.tp = ThreadPool(self.min_workers)
        self.assertEqual(self.tp.min_workers, 3)
        self.assertEqual(self.tp.logger, None)
        self.assertEqual(self.tp.wait, 0.01)
        self.assertTrue(self.tp.daemon is not None)

        self.worker = Worker(self.tp.tasks, None)
        self.assertEqual(self.tp.tasks, self.worker.tasks)
        self.assertEqual(None, self.worker.logger)
Пример #4
0
    def setUp(self):
        IrcTkTestCase.setUp(self)

        self.min_workers = 3
        self.tp = ThreadPool(self.min_workers)
        self.assertEqual(self.tp.min_workers, 3)
        self.assertEqual(self.tp.logger, None)
        self.assertEqual(self.tp.wait, 0.01)
        self.assertTrue(self.tp.daemon is not None)

        self.worker = Worker(self.tp.tasks, None)
        self.assertEqual(self.tp.tasks, self.worker.tasks)
        self.assertEqual(None, self.worker.logger)