l.a.b.t.t.TraversalMixin : class documentation

Part of lp.app.browser.tests.test_launchpad View In Hierarchy

Known subclasses: lp.app.browser.tests.test_launchpad.TestBranchTraversal, lp.app.browser.tests.test_launchpad.TestCodeTraversal, lp.app.browser.tests.test_launchpad.TestPersonTraversal, lp.app.browser.tests.test_launchpad.TestProductTraversal

No class docstring
Method assertDisplaysNotification Assert that an invalid path redirects back to referrer.
Method assertNotFound Undocumented
Method assertRedirects Undocumented
Method traverse Traverse to 'path' using a 'LaunchpadRootNavigation' object.
Method _validateNotificationContext Check the browser notifications associated with the request.
def _validateNotificationContext(self, request, notification=None, level=BrowserNotificationLevel.INFO):
Check the browser notifications associated with the request.

Ensure that the notification instances attached to the request match
the expected values for text and type.

:param notification: The exact notification text to validate. If None
    then we don't care what the notification text is, so long as there
    is some.
: param level: the required notification level
def assertDisplaysNotification(self, path, notification=None, level=BrowserNotificationLevel.INFO):
Assert that an invalid path redirects back to referrer.

The request object is expected to have a notification message to
display to the user to explain the reason for the error.

:param path: The path to check
:param notification: The exact notification text to validate. If None
    then we don't care what the notification text is, so long as there
    is some.
: param level: the required notification level
def assertNotFound(self, path, use_default_referer=True):
Undocumented
def assertRedirects(self, segments, url):
Undocumented
def traverse(self, path, first_segment, use_default_referer=True):
Traverse to 'path' using a 'LaunchpadRootNavigation' object.

Using the Zope traversal machinery, traverse to the path given by 'segments', starting at a LaunchpadRootNavigation object.

CAUTION: Prefer test_traverse to this method, because it correctly establishes the global request.

ParameterspathA slash-delimited path.
use_default_refererIf True, set the referer attribute in the request header to DEFAULT_REFERER = "http://launchpad.test" (otherwise it remains as None)
ReturnsThe object found.
API Documentation for Launchpad, generated by pydoctor at 2022-06-16 00:00:12.