Module: deluge
Branch: master
Commit: c978c6d016b396a404bb52cac70724bd8f1d9a37

Author: Andrew Resch <[email protected]>
Date:   Thu Mar 25 11:47:05 2010 -0700

Fix test_alertmanager

---

 tests/test_alertmanager.py |   13 +++++++++++--
 1 files changed, 11 insertions(+), 2 deletions(-)

diff --git a/tests/test_alertmanager.py b/tests/test_alertmanager.py
index 8f16df2..ae3fb17 100644
--- a/tests/test_alertmanager.py
+++ b/tests/test_alertmanager.py
@@ -4,14 +4,23 @@ import common
 
 from deluge.core.alertmanager import AlertManager
 from deluge.core.core import Core
+import deluge.component as component
 
 class AlertManagerTestCase(unittest.TestCase):
     def setUp(self):
         self.core = Core()
 
-        self.am = AlertManager()
-        self.am.start()
+        self.am = component.get("AlertManager")
+        component.start(["AlertManager"])
 
+    def tearDown(self):
+        def on_shutdown(result):
+            component._ComponentRegistry.components = {}
+            del self.am
+            del self.core
+
+        return component.shutdown().addCallback(on_shutdown)
+        
     def test_register_handler(self):
         def handler(alert):
             return

-- 
You received this message because you are subscribed to the Google Groups 
"deluge-commit" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/deluge-commit?hl=en.

Reply via email to