MCPcopy
hub / github.com/django/django / test_using

Method test_using

tests/test_utils/tests.py:2098–2105  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

2096 self.assertIs(self.callback_called, True)
2097
2098 def test_using(self):
2099 with self.captureOnCommitCallbacks(using="other") as callbacks:
2100 self.enqueue_callback(using="other")
2101
2102 self.assertEqual(len(callbacks), 1)
2103 self.assertIs(self.callback_called, False)
2104 callbacks[0]()
2105 self.assertIs(self.callback_called, True)
2106
2107 def test_different_using(self):
2108 with self.captureOnCommitCallbacks(using="default") as callbacks:

Callers

nothing calls this directly

Calls 2

enqueue_callbackMethod · 0.95

Tested by

no test coverage detected