MCPcopy
hub / github.com/django/django / do

Method do

tests/transaction_hooks/tests.py:32–35  ·  view source on GitHub ↗

Create a Thing instance and notify about it.

(self, num)

Source from the content-addressed store, hash-verified

30 self.notified.append(id_)
31
32 def do(self, num):
33 """Create a Thing instance and notify about it."""
34 Thing.objects.create(num=num)
35 transaction.on_commit(lambda: self.notify(num))
36
37 def assertDone(self, nums):
38 self.assertNotified(nums)

Calls 3

notifyMethod · 0.95
createMethod · 0.45
on_commitMethod · 0.45

Tested by

no test coverage detected