IMO this helper can be replaced with a `@patch` at the class level. It's more clean and tights together the behavior of the mock with the test. For example `side_effect` definition would go within the `test_no_user` test.

I spend a moment testing if what I'm suggesting here makes sense and this is what I came up with
http://pastebin.mozilla.org/4446172