diff options
Diffstat (limited to 'deluge/tests/test_alertmanager.py')
-rw-r--r-- | deluge/tests/test_alertmanager.py | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/deluge/tests/test_alertmanager.py b/deluge/tests/test_alertmanager.py index f197882..5e63864 100644 --- a/deluge/tests/test_alertmanager.py +++ b/deluge/tests/test_alertmanager.py @@ -1,19 +1,15 @@ -# -*- coding: utf-8 -*- # # This file is part of Deluge and is licensed under GNU General Public License 3.0, or later, with # the additional special exception to link portions of this program with the OpenSSL library. # See LICENSE for more details. # -from __future__ import unicode_literals - import deluge.component as component +from deluge.conftest import BaseTestCase from deluge.core.core import Core -from .basetest import BaseTestCase - -class AlertManagerTestCase(BaseTestCase): +class TestAlertManager(BaseTestCase): def set_up(self): self.core = Core() self.core.config.config['lsd'] = False @@ -28,7 +24,7 @@ class AlertManagerTestCase(BaseTestCase): return self.am.register_handler('dummy_alert', handler) - self.assertEqual(self.am.handlers['dummy_alert'], [handler]) + assert self.am.handlers['dummy_alert'] == [handler] def test_deregister_handler(self): def handler(alert): @@ -36,4 +32,4 @@ class AlertManagerTestCase(BaseTestCase): self.am.register_handler('dummy_alert', handler) self.am.deregister_handler(handler) - self.assertEqual(self.am.handlers['dummy_alert'], []) + assert self.am.handlers['dummy_alert'] == [] |