← Back to team overview

launchpad-dev team mailing list archive

Login helper love!

 

Are you tired of thinking?

Do you just want to write tests?

There are now branch new login helpers to help you not think and write
tests at the same time.

with celebrity_logged_in('admin'):
    ubuntu.name = 'jonobuntu'

or

@with_celebrity_logged_in('vcs_imports')
def change_the_time():
    pass

There's also anonymous_logged_in, person_logged_in,
with_anonymous_logged_in and with_person_logged_in. Also, the less new
login_as() and login_celebrity(). Read more about it at
http://people.canonical.com/~mwh/canonicalapi/lp.testing.html.

All of this means there's absolutely no excuse for logging in with
sampledata accounts ever.

jml



Follow ups