{"action":"created","issue":{"url":"https://api.github.com/repos/carljm/django-transaction-hooks/issues/21","labels_url":"https://api.github.com/repos/carljm/django-transaction-hooks/issues/21/labels{/name}","comments_url":"https://api.github.com/repos/carljm/django-transaction-hooks/issues/21/comments","events_url":"https://api.github.com/repos/carljm/django-transaction-hooks/issues/21/events","html_url":"https://github.com/carljm/django-transaction-hooks/issues/21","id":122207033,"number":21,"title":"Django test handling","user":{"login":"djsmith42","id":921044,"avatar_url":"https://avatars.githubusercontent.com/u/921044?v=3","gravatar_id":"","url":"https://api.github.com/users/djsmith42","html_url":"https://github.com/djsmith42","followers_url":"https://api.github.com/users/djsmith42/followers","following_url":"https://api.github.com/users/djsmith42/following{/other_user}","gists_url":"https://api.github.com/users/djsmith42/gists{/gist_id}","starred_url":"https://api.github.com/users/djsmith42/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/djsmith42/subscriptions","organizations_url":"https://api.github.com/users/djsmith42/orgs","repos_url":"https://api.github.com/users/djsmith42/repos","events_url":"https://api.github.com/users/djsmith42/events{/privacy}","received_events_url":"https://api.github.com/users/djsmith42/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2015-12-15T07:02:50Z","updated_at":"2015-12-15T18:07:10Z","closed_at":"2015-12-15T18:07:10Z","body":"Since Django tests start a new transaction and never commit it, any `on_commit` hooks will never get a chance to run in test mode. We've worked around this by writing a test utility that simply calls all registered `on_commit` hooks, but sometimes this isn't enough.\r\n\r\nWhat do you think about the idea of running `on_commit` hooks when a `SAVEPOINT` is committed, but only if we are in test mode? I know there are probably some false positives, but it would simplify testing quite a bit for us.\r\n\r\nI'd love to discuss this idea more."},"comment":{"url":"https://api.github.com/repos/carljm/django-transaction-hooks/issues/comments/164843839","html_url":"https://github.com/carljm/django-transaction-hooks/issues/21#issuecomment-164843839","issue_url":"https://api.github.com/repos/carljm/django-transaction-hooks/issues/21","id":164843839,"user":{"login":"carljm","id":61586,"avatar_url":"https://avatars.githubusercontent.com/u/61586?v=3","gravatar_id":"","url":"https://api.github.com/users/carljm","html_url":"https://github.com/carljm","followers_url":"https://api.github.com/users/carljm/followers","following_url":"https://api.github.com/users/carljm/following{/other_user}","gists_url":"https://api.github.com/users/carljm/gists{/gist_id}","starred_url":"https://api.github.com/users/carljm/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/carljm/subscriptions","organizations_url":"https://api.github.com/users/carljm/orgs","repos_url":"https://api.github.com/users/carljm/repos","events_url":"https://api.github.com/users/carljm/events{/privacy}","received_events_url":"https://api.github.com/users/carljm/received_events","type":"User","site_admin":false},"created_at":"2015-12-15T18:07:10Z","updated_at":"2015-12-15T18:07:10Z","body":"Ok. Closing this issue for now, then."}}