Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Pages: Add optional path argument to Plone.visit_portal.

  • Loading branch information...
commit 146ecb01e5e8601955884a0a0ef379d59bc4b61f 1 parent fe024d5
@jone jone authored
Showing with 7 additions and 2 deletions.
  1. +7 −2 ftw/testing/pages.py
View
9 ftw/testing/pages.py
@@ -80,8 +80,13 @@ def normalize_whitespace(self, text):
class Plone(PageObject):
- def visit_portal(self):
- browser().visit(self.portal_url)
+ def visit_portal(self, path=None):
+ if path:
+ url = '/'.join((self.portal_url, path))
+ else:
+ url = self.portal_url
+
+ browser().visit(url)
return self
def login(self, user=TEST_USER_NAME, password=TEST_USER_PASSWORD):
Please sign in to comment.
Something went wrong with that request. Please try again.