Closed Bug 806600 Opened 12 years ago Closed 12 years ago

Faster tests, no need to bcrypt in integration tests

Categories

(Webtools Graveyard :: Elmo, defect)

x86
macOS
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: peterbe, Assigned: peterbe)

Details

Attachments

(1 file)

With bcrypt as the hasher storing our users' passwords:

    Ran 170 tests in 27.822s

With MD5...:

    Ran 170 tests in 14.478s

I ran some profiling on the test suite and django_sha2's hasher.py is the most guilty one.

We don't need secure passwords in tests. Besides, we don't really care much about passwords because our real users are stored with unusable passwords anyway (using LDAP instead)
I'm applying this same technique on all my other projects.
Attachment #676367 - Flags: review?(l10n)
An alternative is to leave in settings/local.py-dist, but commented out, this setting so individual developers who are confident with what they do can switch this on for faster tests. 
30 seconds it's much to wait for for jenkins.
Comment on attachment 676367 [details] [diff] [review]
works wonderfully

Review of attachment 676367 [details] [diff] [review]:
-----------------------------------------------------------------

Looks good to me, r=me.
Attachment #676367 - Flags: review?(l10n) → review+
Status: NEW → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
Target Milestone: --- → 2.4
Assignee: nobody → peterbe
Product: Webtools → Webtools Graveyard
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: