issue #406: add test.
This commit is contained in:
parent
4230a93557
commit
e9a6e4c3d2
|
@ -1,6 +1,7 @@
|
|||
|
||||
import threading
|
||||
|
||||
import mock
|
||||
import unittest2
|
||||
|
||||
import testlib
|
||||
|
@ -8,6 +9,19 @@ import testlib
|
|||
import mitogen.core
|
||||
|
||||
|
||||
class ShutdownTest(testlib.TestCase):
|
||||
klass = mitogen.core.Broker
|
||||
|
||||
def test_poller_closed(self):
|
||||
broker = self.klass()
|
||||
actual_close = broker.poller.close
|
||||
broker.poller.close = mock.Mock()
|
||||
broker.shutdown()
|
||||
broker.join()
|
||||
self.assertEquals(1, len(broker.poller.close.mock_calls))
|
||||
actual_close()
|
||||
|
||||
|
||||
class DeferSyncTest(testlib.TestCase):
|
||||
klass = mitogen.core.Broker
|
||||
|
||||
|
|
Loading…
Reference in New Issue