def getBrowser(self, login=True):
browser = z2.Browser(self.portal)<EOL>browser.addHeader('<STR_LIT>', '<STR_LIT>')<EOL>browser.handleErrors = False<EOL>if login:<EOL><INDENT>browser.open(self.portal.absolute_url() + "<STR_LIT>")<EOL>browser.getControl(name='<STR_LIT>').value = TEST_USER_NAME<EOL>browser.getControl(name='<STR_LIT>').value = TEST_USER_PASSWORD<EOL>browser.getControl(name='<STR_LIT>').click()<EOL>self.assertTrue('<STR_LIT>' in browser.contents)<EOL><DEDENT>return browser<EOL>
Instantiate and return a testbrowser for convenience