{"action":"closed","issue":{"url":"https://api.github.com/repos/django-nose/django-nose/issues/89","labels_url":"https://api.github.com/repos/django-nose/django-nose/issues/89/labels{/name}","comments_url":"https://api.github.com/repos/django-nose/django-nose/issues/89/comments","events_url":"https://api.github.com/repos/django-nose/django-nose/issues/89/events","html_url":"https://github.com/django-nose/django-nose/issues/89","id":6292518,"number":89,"title":"Dirty DB","user":{"login":"zvictor","id":181076,"avatar_url":"https://avatars.githubusercontent.com/u/181076?v=3","gravatar_id":"","url":"https://api.github.com/users/zvictor","html_url":"https://github.com/zvictor","followers_url":"https://api.github.com/users/zvictor/followers","following_url":"https://api.github.com/users/zvictor/following{/other_user}","gists_url":"https://api.github.com/users/zvictor/gists{/gist_id}","starred_url":"https://api.github.com/users/zvictor/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zvictor/subscriptions","organizations_url":"https://api.github.com/users/zvictor/orgs","repos_url":"https://api.github.com/users/zvictor/repos","events_url":"https://api.github.com/users/zvictor/events{/privacy}","received_events_url":"https://api.github.com/users/zvictor/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/django-nose/django-nose/labels/feature","name":"feature","color":"d4c5f9"}],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2012-08-17T15:49:09Z","updated_at":"2015-07-07T03:02:14Z","closed_at":"2015-07-07T03:02:14Z","body":"I am having `IntegrityError` problems when `REUSE_DB` is activated.\nIt happens because my tests try to **recreate instances** already existent in database, **created on earlier runs**.\n\n\n\n```ruby\nIntegrityError: duplicate key value violates unique constraint \"auth_user_username_key\"\n```\n\nI believe that **every time** we run our tests, it **should found the same** enviroment.\nRepeting tests, must repeat results.\nNowadays, it is not what is happening, because it **is accumulating dirt** on database.\n\nSo, I propose we do a **rollback** after tests run. Not after each test, as proposed on #20 (would be very slower, and can be done overiding TestCase), but **after all tests are done**.\n\nI am new with `nose` and `django-nose`, so I appreciate to know your ideas."}}