Skip to content

Commit

Permalink
clean(error_handler): cleaner tests
Browse files Browse the repository at this point in the history
  • Loading branch information
sydneyli committed Mar 23, 2018
1 parent 6267140 commit 1b32da8
Showing 1 changed file with 3 additions and 9 deletions.
12 changes: 3 additions & 9 deletions certbot/tests/error_handler_test.py
Expand Up @@ -36,7 +36,7 @@ def send_signal(signum):


class ErrorHandlerTest(unittest.TestCase):
"""Tests for certbot.error_handler."""
"""Tests for certbot.error_handler.ErrorHandler."""

def setUp(self):
from certbot import error_handler
Expand Down Expand Up @@ -124,21 +124,15 @@ def test_regular_exit(self):


class ExitHandlerTest(ErrorHandlerTest):
"""Tests for certbot.error_handler."""
"""Tests for certbot.error_handler.ExitHandler."""

def setUp(self):
from certbot import error_handler

self.init_func = mock.MagicMock()
self.init_args = set((42,))
self.init_kwargs = {'foo': 'bar'}
super(ExitHandlerTest, self).setUp()
self.handler = error_handler.ExitHandler(self.init_func,
*self.init_args,
**self.init_kwargs)

# pylint: disable=protected-access
self.signals = error_handler._SIGNALS

def test_regular_exit(self):
func = mock.MagicMock()
self.handler.register(func)
Expand Down

0 comments on commit 1b32da8

Please sign in to comment.