{"comment":{"url":"https://api.github.com/repos/mfraezz/osf.io/comments/13996107","html_url":"https://github.com/mfraezz/osf.io/commit/2c480d45eaf40f3c7944dc1d9f7e00165f82671c#commitcomment-13996107","id":13996107,"user":{"login":"abought","id":2957073,"avatar_url":"https://avatars.githubusercontent.com/u/2957073?v=3","gravatar_id":"","url":"https://api.github.com/users/abought","html_url":"https://github.com/abought","followers_url":"https://api.github.com/users/abought/followers","following_url":"https://api.github.com/users/abought/following{/other_user}","gists_url":"https://api.github.com/users/abought/gists{/gist_id}","starred_url":"https://api.github.com/users/abought/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/abought/subscriptions","organizations_url":"https://api.github.com/users/abought/orgs","repos_url":"https://api.github.com/users/abought/repos","events_url":"https://api.github.com/users/abought/events{/privacy}","received_events_url":"https://api.github.com/users/abought/received_events","type":"User","site_admin":false},"position":30,"line":80,"path":"api_tests/applications/views/test_application_reset.py","commit_id":"2c480d45eaf40f3c7944dc1d9f7e00165f82671c","created_at":"2015-10-26T21:26:45Z","updated_at":"2015-10-26T21:26:45Z","body":"Before the assertion, call `self.user1_app.reload()`, similar to what you did [above](https://github.com/mfraezz/osf.io/commit/2c480d45eaf40f3c7944dc1d9f7e00165f82671c#diff-fb32236cae0b7f086eba941c3505480bR60)\r\n\r\nSorry for not mentioning that sooner; it's a subtle point. Basically, your API call could (in theory) change the DB data outside the function. So before you check the value in the model, you need to fetch the newest data from the database. \r\n\r\nOtherwise, you're checking against a (possibly outdated) version in cache/ memory, rather than the result of whatever the API call actually did to the instance. Assume the data *might* have changed, even for failure cases- otherwise your test is doing something different than you think."}}