MCPcopy
hub / github.com/django/django / Receiver

Class Receiver

tests/migrate_signals/tests.py:24–32  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

22
23
24class Receiver:
25 def __init__(self, signal):
26 self.call_counter = 0
27 self.call_args = None
28 signal.connect(self, sender=APP_CONFIG)
29
30 def __call__(self, signal, sender, **kwargs):
31 self.call_counter += 1
32 self.call_args = kwargs
33
34
35class OneTimeReceiver:

Callers 2

test_argsMethod · 0.85
test_migrations_onlyMethod · 0.85

Calls

no outgoing calls

Tested by 2

test_argsMethod · 0.68
test_migrations_onlyMethod · 0.68