def METHOD_NAME(self):
    self.request.set("REQUEST_METHOD", "POST")
    authenticator = getMultiAdapter(
        (self.portal, self.request), name="authenticator"
    )
    html = authenticator.authenticator()
    token = re.search('value="(.*)"', html).groups()[0]
    self.request.set("_authenticator", token)