MCPcopy
hub / github.com/django/django / test_send

Method test_send

tests/signals/tests.py:570–577  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

568 self.assertEqual(result, [(sync_handler, 1), (async_handler, 1)])
569
570 def test_send(self):
571 sync_handler = SyncHandler()
572 async_handler = AsyncHandler()
573 signal = dispatch.Signal()
574 signal.connect(sync_handler)
575 signal.connect(async_handler)
576 result = signal.send(self.__class__)
577 self.assertEqual(result, [(sync_handler, 1), (async_handler, 1)])
578
579 def test_send_robust(self):
580 class ReceiverException(Exception):

Callers

nothing calls this directly

Calls 4

connectMethod · 0.95
sendMethod · 0.95
SyncHandlerClass · 0.85
AsyncHandlerClass · 0.85

Tested by

no test coverage detected