This *might* be helpful depending on how you're testing: http://stackoverflow.com/questions/2036202/how-to-mock-users-and-requests-in-django
On Wed, Sep 5, 2012 at 11:36 AM, Kurtis Mullins <[email protected]>wrote: > I don't see why not. Are you running unit tests (testing scripts) or are > you just using the browser for testing? > > > On Wed, Sep 5, 2012 at 11:24 AM, Larry Martell <[email protected]>wrote: > >> On Wed, Sep 5, 2012 at 9:22 AM, Kurtis Mullins <[email protected]> >> wrote: >> > If any of your templates/views depend upon a request.user object, >> you'll run >> > into issues because that will not exist without "logging in". I'm not >> sure >> > of a good way around this off-hand without knowing more about your site. >> > Sorry! >> >> Yes, they do depend on a request.user object. Can I hard code the >> initialization of it? >> >> > >> > On Wed, Sep 5, 2012 at 11:18 AM, Larry Martell <[email protected] >> > >> > wrote: >> >> >> >> We have a django app that requires the users to login. For some >> >> testing we want to do, we want to disable this so the app can be run >> >> without logging in. Is there some way to easily do this? I've tried >> >> commenting out all the @login_required decorations, but then I was >> >> getting a 403. I tried commenting out the 'if not >> >> controller.has_access' lines, but then I was getting 'Report.owner" >> >> must be a "User" instance.' Before I hack up the code any more, is >> >> there some way to just globally disable the need to login? >> >> >> >> -- >> >> You received this message because you are subscribed to the Google >> Groups >> >> "Django users" group. >> >> To post to this group, send email to [email protected]. >> >> To unsubscribe from this group, send email to >> >> [email protected]. >> >> For more options, visit this group at >> >> http://groups.google.com/group/django-users?hl=en. >> >> >> > >> > -- >> > You received this message because you are subscribed to the Google >> Groups >> > "Django users" group. >> > To post to this group, send email to [email protected]. >> > To unsubscribe from this group, send email to >> > [email protected]. >> > For more options, visit this group at >> > http://groups.google.com/group/django-users?hl=en. >> >> -- >> You received this message because you are subscribed to the Google Groups >> "Django users" group. >> To post to this group, send email to [email protected]. >> To unsubscribe from this group, send email to >> [email protected]. >> For more options, visit this group at >> http://groups.google.com/group/django-users?hl=en. >> >> > -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/django-users?hl=en.

