iro/tests/pool.py
branchdevel
changeset 246 de38fe2eb224
child 294 0e75bd39767d
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/iro/tests/pool.py	Fri Mar 23 16:24:11 2012 +0100
@@ -0,0 +1,21 @@
+from twisted.trial import unittest
+from mock import Mock
+import copy
+
+from iro.controller import pool
+
+class PoolTestCase(unittest.TestCase):
+
+    def setUp(self):
+        self._pools = copy.copy(pool.pools)
+        
+    def tearDown(self):
+        del pool.pools[:]
+        pool.pools.extend(self._pools)
+
+    def testStartPool(self):
+        del pool.pools[:]
+        pool.pools.extend([Mock(),Mock()])
+        pool.startPool("blafo")
+        for i in pool.pools:
+            i.start.assert_called_with("blafo")