{"action":"created","issue":{"url":"https://api.github.com/repos/django/django/issues/7528","repository_url":"https://api.github.com/repos/django/django","labels_url":"https://api.github.com/repos/django/django/issues/7528/labels{/name}","comments_url":"https://api.github.com/repos/django/django/issues/7528/comments","events_url":"https://api.github.com/repos/django/django/issues/7528/events","html_url":"https://github.com/django/django/pull/7528","id":187852329,"node_id":"MDExOlB1bGxSZXF1ZXN0OTI2ODEwMDM=","number":7528,"title":"Fixed #25251 -- Made data migrations available in TransactionTestCase.","user":{"login":"romgar","id":2834704,"node_id":"MDQ6VXNlcjI4MzQ3MDQ=","avatar_url":"https://avatars3.githubusercontent.com/u/2834704?v=4","gravatar_id":"","url":"https://api.github.com/users/romgar","html_url":"https://github.com/romgar","followers_url":"https://api.github.com/users/romgar/followers","following_url":"https://api.github.com/users/romgar/following{/other_user}","gists_url":"https://api.github.com/users/romgar/gists{/gist_id}","starred_url":"https://api.github.com/users/romgar/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/romgar/subscriptions","organizations_url":"https://api.github.com/users/romgar/orgs","repos_url":"https://api.github.com/users/romgar/repos","events_url":"https://api.github.com/users/romgar/events{/privacy}","received_events_url":"https://api.github.com/users/romgar/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":17,"created_at":"2016-11-07T22:48:46Z","updated_at":"2018-11-06T18:33:48Z","closed_at":null,"author_association":"CONTRIBUTOR","pull_request":{"url":"https://api.github.com/repos/django/django/pulls/7528","html_url":"https://github.com/django/django/pull/7528","diff_url":"https://github.com/django/django/pull/7528.diff","patch_url":"https://github.com/django/django/pull/7528.patch"},"body":"Data loaded in migrations are restored at the beginning of each `TransactionTestCase` and all the tables are truncated at the end of these test cases.\r\nIt means that, at the end of your whole test suite, if there was at least one `TransactionTestCase`, the migrated data are no more in the database, specially surprising when using `--keepdb` option.\r\nNow we restore data at the end of a `TransactionTestCase`, to be sure that the next test will be in the expected environment (data loaded from initial migrations)\r\nIt also means that we add some informations in the test class itself to know if the next test needs a data rollback, to handle situations where `TransactionTestCase` with `serialized_rollback = True` and `serialized_callback = False` are mixed.\r\n\r\n@timgraham At the end I preferred to create a new PR to come back to a fresh environment for further discussions. Initial proposals were https://github.com/django/django/pull/6137 and https://github.com/django/django/pull/6297.\r\n"},"comment":{"url":"https://api.github.com/repos/django/django/issues/comments/436359612","html_url":"https://github.com/django/django/pull/7528#issuecomment-436359612","issue_url":"https://api.github.com/repos/django/django/issues/7528","id":436359612,"node_id":"MDEyOklzc3VlQ29tbWVudDQzNjM1OTYxMg==","user":{"login":"romgar","id":2834704,"node_id":"MDQ6VXNlcjI4MzQ3MDQ=","avatar_url":"https://avatars3.githubusercontent.com/u/2834704?v=4","gravatar_id":"","url":"https://api.github.com/users/romgar","html_url":"https://github.com/romgar","followers_url":"https://api.github.com/users/romgar/followers","following_url":"https://api.github.com/users/romgar/following{/other_user}","gists_url":"https://api.github.com/users/romgar/gists{/gist_id}","starred_url":"https://api.github.com/users/romgar/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/romgar/subscriptions","organizations_url":"https://api.github.com/users/romgar/orgs","repos_url":"https://api.github.com/users/romgar/repos","events_url":"https://api.github.com/users/romgar/events{/privacy}","received_events_url":"https://api.github.com/users/romgar/received_events","type":"User","site_admin":false},"created_at":"2018-11-06T18:33:48Z","updated_at":"2018-11-06T18:33:48Z","author_association":"CONTRIBUTOR","body":"I'm not sure. I don't think that's important to state in the documentation where the data is loaded if we use `serialized_rollback = True`. This data loading \"moves\" from the beginning to the end of the test, but it should not have any visible effect for anybody (hopefully)."}}
{"actor":{"display_login":"romgar"}}