You don't want to ever patch things that are under test, as you've done in your unit tests. A better way to do this is to pull out this redirect stuff that you've done and use the Mock library to patch the redirect helper that you're importing from django.