Hello everyone,

There is now an lp.testing.sampledata module in the tree. Whenever you
come across a test that uses a literal string or a literal integer to
refer to sampledata, please define the literal as a constant in
lp.testing.sampledata and use the constant instead.

e.g. Instead of:
  login('[email protected]') # This is bad. Magic strings are bad.

Use:
  login(ADMIN_USER_EMAIL) # Constants with intent-revealing names are good

In addition to the improved clarity, using this module will make it
easier for us to identify the tests that use sampledata and make them
stop.

jml

_______________________________________________
Mailing list: https://launchpad.net/~launchpad-dev
Post to     : [email protected]
Unsubscribe : https://launchpad.net/~launchpad-dev
More help   : https://help.launchpad.net/ListHelp

Reply via email to