python - Can I use an identity hasher for testing? -


i have tests need create fully-functional test users. subclassing testcase in tests, , initializing test database in setup method. however, in order create functional users, need give them useful passwords calling make_password

this sufficiently computationally intensive cause development server (a raspberry pi) take multiple seconds each test.

my question is: can force django not hash password during tests? improve performance of test suite, , give me benefits come along that.

perhaps you're looking for: https://docs.djangoproject.com/en/dev/topics/auth/passwords/

basically, create subclass of django.contrib.auth.hashers.pbkdf2passwordhasher , add new hasher first entry in password_hashers in settings.


Comments

Popular posts from this blog

SPSS keyboard combination alters encoding -

Add new record to the table by click on the button in Microsoft Access -

CSS3 Transition to highlight new elements created in JQuery -