Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Possible cheap win to make your playdoh test suite 100% faster

14 views
Skip to first unread message

Peter Bengtsson

unread,
Nov 1, 2012, 10:49:47 AM11/1/12
to dev-w...@lists.mozilla.org
The above subject line was probably the spam-soundigast ever.

Anyway, if you haven't already done so, change to a very basic password
hasher for your unit tests and you see really dramatic speedups.

For example:
Elmo:
From:
Ran 170 tests in 27.822s
To:
Ran 170 tests in 14.478s
https://bugzilla.mozilla.org/show_bug.cgi?id=806600#c0

Airmozilla:
From:
Ran 89 tests in 58.455s
To:
Ran 89 tests in 15.668s


All you have to do is add the following lines to settings_test.py in the
repo root (not the package root)::

PASSWORD_HASHERS = (
'django.contrib.auth.hashers.MD5PasswordHasher',
)

There is no reason to use bcrypt to store passwords belonging to fixture
users.

Hail jbalogh's brutal but powerful test-utils which is shipped with
every playdoh project!

Peter Bengtsson

unread,
Nov 5, 2012, 5:44:48 PM11/5/12
to dev-w...@lists.mozilla.org
FYI, this is now default in playdoh:
https://github.com/mozilla/playdoh/commit/42f11e27d98da3af4c86af64d57ac304b3b83255
> _______________________________________________
> dev-webdev mailing list
> dev-w...@lists.mozilla.org
> https://lists.mozilla.org/listinfo/dev-webdev
0 new messages