Code review comment for lp:~ralsina/ubuntu-sso-client/validate-harder

Revision history for this message
Roberto Alsina (ralsina) wrote :

> For the validation to be correct, I think this method:
>
> def is_correct_password_confirmation(self, password):
> """Return if the password is correct."""
> return self.view.ui.password_line_edit.text() == password
>
> should be:
>
> def is_correct_password_confirmation(self, password):
> """Return if the password is correct."""
> return unicode(self.view.ui.password_line_edit.text()) == password

Those two are equivalent because QStrings and unicode strings comparison works.
Added it anyway to be explicit.

> Also, all docstrings need to end with a dot.

Fixed

> Question, shouldn't these checks in our code assert over a specific validation
> callback instead of any callable?
>
> self.view.ui.password_edit.textChanged.connect(MATCH(callable))

I agree, but it's the way it's done in all the other tests, and improving the mocker-based tests is
not exactly my forte ;-)

> Great work on all the tests added!

Thanks!

« Back to merge proposal