Hi Brad,
a nice branch r=me. I have only a minor cosmetic suggestion, see below.
Abel
> === modified file 'lib/lp/testing/registration.py' > --- lib/lp/testing/registration.py 2009-10-08 20:22:25 +0000 > +++ lib/lp/testing/registration.py 2009-10-16 16:35:20 +0000 > @@ -24,9 +24,10 @@ > return '' > > > -def set_captcha_answer(browser, answer=None): > +def set_captcha_answer(browser, answer=None, prefix=''): > """Given a browser, set the login captcha with the correct answer.""" > if answer is None: > answer = get_captcha_answer(browser.contents) > - browser.getControl(name='loginpage_captcha_submission').value = ( > + control_name = prefix + 'captcha_submission' > + browser.getControl(name=control_name).value = ( > answer)
I think you can merge the last two lines in one ;)
« Back to merge proposal
Hi Brad,
a nice branch r=me. I have only a minor cosmetic suggestion, see below.
Abel
> === modified file 'lib/lp/ testing/ registration. py' testing/ registration. py 2009-10-08 20:22:25 +0000 testing/ registration. py 2009-10-16 16:35:20 +0000 answer( browser, answer=None): answer( browser, answer=None, prefix=''): answer( browser. contents) getControl( name='loginpage _captcha_ submission' ).value = ( submission' getControl( name=control_ name).value = (
> --- lib/lp/
> +++ lib/lp/
> @@ -24,9 +24,10 @@
> return ''
>
>
> -def set_captcha_
> +def set_captcha_
> """Given a browser, set the login captcha with the correct answer."""
> if answer is None:
> answer = get_captcha_
> - browser.
> + control_name = prefix + 'captcha_
> + browser.
> answer)
I think you can merge the last two lines in one ;)