Skip to content

Commit

Permalink
Testing coverage #38
Browse files Browse the repository at this point in the history
  • Loading branch information
dennissiemensma committed Feb 17, 2016
1 parent cb9323e commit 832779e
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions dsmr_backend/tests/test_backend.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,10 @@ def test_backend_creation_signal(self, signal_mock):
def test_robust_signal(self):
""" Test whether the signal is robust, handling any exceptions. """

def _on_backend_called_signal(*args, **kwargs):
def _trouble_making_callback(*args, **kwargs):
raise BrokenPipeError("Signal receiver crashed for some reason...")

dsmr_backend.signals.backend_called.connect(
receiver=_on_backend_called_signal,
dispatch_uid=self.__class__
)
dsmr_backend.signals.backend_called.connect(receiver=_trouble_making_callback)

with self.assertRaises(CommandError):
# Signal should crashs, rasing a command error.
Expand Down

0 comments on commit 832779e

Please sign in to comment.