Commit 122a2409 authored by Arnaud Fontaine's avatar Arnaud Fontaine

When getting the number of activities, do not actually visit the URL

to stay on the page


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk/utils@44971 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 932a34cc
...@@ -435,14 +435,16 @@ class Browser(ExtendedTestBrowser): ...@@ -435,14 +435,16 @@ class Browser(ExtendedTestBrowser):
def getRemainingActivityCounter(self): def getRemainingActivityCounter(self):
""" """
Return the number of remaining activities Return the number of remaining activities, but do not visit the
URL so it does not interfere with next calls.
@return: The number of remaining activities @return: The number of remaining activities
@rtype: int @rtype: int
""" """
self.open('portal_activities/countMessage') activity_counter = self.mech_browser.open_novisit(
return self.contents and int(self.contents) or 0 'portal_activities/countMessage').read()
return activity_counter and int(activity_counter) or 0
from zope.testbrowser.browser import Form, ListControl from zope.testbrowser.browser import Form, ListControl
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment