MCPcopy
hub / github.com/django/django / __call__

Method __call__

tests/migrate_signals/tests.py:47–54  ·  view source on GitHub ↗
(self, signal, sender, **kwargs)

Source from the content-addressed store, hash-verified

45 self.signal.connect(self, sender=APP_CONFIG)
46
47 def __call__(self, signal, sender, **kwargs):
48 # Although test runner calls migrate for several databases,
49 # testing for only one of them is quite sufficient.
50 if kwargs["using"] == MIGRATE_DATABASE:
51 self.call_counter += 1
52 self.call_args = kwargs
53 # we need to test only one call of migrate
54 self.signal.disconnect(self, sender=APP_CONFIG)
55
56
57# We connect receiver here and not in unit test code because we need to

Callers

nothing calls this directly

Calls 1

disconnectMethod · 0.45

Tested by

no test coverage detected