On Tue, Apr 27, 2010 at 3:41 AM, Tim Penhey <[email protected]> wrote:
> Hi All,
>
> In a desire to make breadcrumbs easier to test, and to provide a useful test
> function, I've been attempting to write a function that takes a canonical_url
> of an object, and returns the object that was traversed to and a request
> object.
>
...
> I feel there must be something else that at each traversal step gets the
> navigation object for the object being traversed, and then calls
> publishTraverse on that navigation object.  However I can't seem to find it.
> Can some zope guru please point me in the right place?
>

I'm no zope guru, but there's a class called TraversalMixin in
lib/canonical/launchpad/browser/tests/test_launchpad.py that has a
traverse method that looks like it does what you want. Someone (me?)
used it to write the tests for the lp.net/+branch/<shortname>
redirection.

You've probably already solved the problem though. If you have, please
share how!

jml

_______________________________________________
Mailing list: https://launchpad.net/~launchpad-dev
Post to     : [email protected]
Unsubscribe : https://launchpad.net/~launchpad-dev
More help   : https://help.launchpad.net/ListHelp

Reply via email to