Hi Philipp,

My choice of words is poor. No, I am not redirected, the url remains the
same as typed but I do get a view which displays text saying
'Unauthorised, you are not' etc from
zope/app/exception/browser/unauthorized.pt but the testbrowser doesn't
give me this view. This behaviour suprised me and I don't yet see how to
use the test.

    >>> print
    >>> 'Unauthorized' in browser.contents

Doesn't pass and

    >>> print
    Exception raised:
    HTTPError: HTTP Error 403: Forbidden

Doesn't pass. I can't figure how to use the test to test for what I
expect - which is of course an exception.

Sorry for the bother.


On Sun, 2006-08-27 at 14:00 +0200, Philipp von Weitershausen wrote:
> Darryl Cousins wrote:
> > Hi Philipp,
> > 
> > Yup. Sorry I was unclear, I mean that in a browser (ZMI) I am redirected
> > to the view which displays "Unauthorised, you are not authorised' or
> > similar. I am suprised therefore that I don't get the same view with
> > testbrowser.
> Again, you're *not* redirected. Try to provoke an Unauthorized exception
> in a browser and watch the URL. It doesnt' change. Exception views are
> always displayed in place of the view you're supposed to see. There's no
> redirect.
> Philipp

Zope3-users mailing list

Reply via email to