{"action":"created","issue":{"url":"https://api.github.com/repos/pytest-dev/pytest-django/issues/423","repository_url":"https://api.github.com/repos/pytest-dev/pytest-django","labels_url":"https://api.github.com/repos/pytest-dev/pytest-django/issues/423/labels{/name}","comments_url":"https://api.github.com/repos/pytest-dev/pytest-django/issues/423/comments","events_url":"https://api.github.com/repos/pytest-dev/pytest-django/issues/423/events","html_url":"https://github.com/pytest-dev/pytest-django/issues/423","id":190206861,"number":423,"title":"Multi db tests behave differently on different dbs","user":{"login":"obiwanus","id":179863,"avatar_url":"https://avatars.githubusercontent.com/u/179863?v=3","gravatar_id":"","url":"https://api.github.com/users/obiwanus","html_url":"https://github.com/obiwanus","followers_url":"https://api.github.com/users/obiwanus/followers","following_url":"https://api.github.com/users/obiwanus/following{/other_user}","gists_url":"https://api.github.com/users/obiwanus/gists{/gist_id}","starred_url":"https://api.github.com/users/obiwanus/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/obiwanus/subscriptions","organizations_url":"https://api.github.com/users/obiwanus/orgs","repos_url":"https://api.github.com/users/obiwanus/repos","events_url":"https://api.github.com/users/obiwanus/events{/privacy}","received_events_url":"https://api.github.com/users/obiwanus/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":4,"created_at":"2016-11-18T00:41:10Z","updated_at":"2016-11-21T00:47:58Z","closed_at":null,"body":"I have two identical sqlite databases for testing\r\n```\r\nDATABASES = {\r\n    'default': {\r\n        'ENGINE': 'django.db.backends.sqlite3',\r\n        'NAME': 'first',\r\n    },\r\n    'second': {\r\n        'ENGINE': 'django.db.backends.sqlite3',\r\n        'NAME': 'second',\r\n    },\r\n}\r\n```\r\nAt the start of each test the default database is clean, but the second database contains the data from the previous test runs.\r\nThe transaction setting `pytestmark = pytest.mark.django_db(transaction=True)` doesn't seem to have any effect on the default database behaviour - it is always clean for every test regardless of whether `transaction` is `True` or `False`. The same is true for the second database except it's always dirty."},"comment":{"url":"https://api.github.com/repos/pytest-dev/pytest-django/issues/comments/261819489","html_url":"https://github.com/pytest-dev/pytest-django/issues/423#issuecomment-261819489","issue_url":"https://api.github.com/repos/pytest-dev/pytest-django/issues/423","id":261819489,"user":{"login":"obiwanus","id":179863,"avatar_url":"https://avatars.githubusercontent.com/u/179863?v=3","gravatar_id":"","url":"https://api.github.com/users/obiwanus","html_url":"https://github.com/obiwanus","followers_url":"https://api.github.com/users/obiwanus/followers","following_url":"https://api.github.com/users/obiwanus/following{/other_user}","gists_url":"https://api.github.com/users/obiwanus/gists{/gist_id}","starred_url":"https://api.github.com/users/obiwanus/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/obiwanus/subscriptions","organizations_url":"https://api.github.com/users/obiwanus/orgs","repos_url":"https://api.github.com/users/obiwanus/repos","events_url":"https://api.github.com/users/obiwanus/events{/privacy}","received_events_url":"https://api.github.com/users/obiwanus/received_events","type":"User","site_admin":false},"created_at":"2016-11-21T00:47:58Z","updated_at":"2016-11-21T00:47:58Z","body":"OK I've created a repo with a minimal example that should demonstrate the issue\r\n\r\nhttps://github.com/obiwanus/pytest-django-bug\r\n\r\nPlease let me know if you have any problems with it. Thanks"}}
{"actor":{"display_login":"obiwanus"}}