Code review comment for lp:~bac/launchpad/bug-452491-captcha2-boogaloo

Revision history for this message
Abel Deuring (adeuring) wrote :

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 ;)

review: Approve

« Back to merge proposal