joestump / django-ajax

A simple framework for creating AJAX endpoints in Django.
http://github.com/joestump/django-ajax
BSD 3-Clause "New" or "Revised" License
260 stars 53 forks source link

Django 1.10: Replace test fixture reliance on deprecated SHA1 hasher #71

Open adevore opened 8 years ago

adevore commented 8 years ago

Django 1.10 has removed support for the SHA1 hasher in the default list of hashers. This PR replaces the password in the users.json test fixture with a newly hashed password.

Pull request #70 should be merged before this pull request.

nicholasserra commented 8 years ago

My concern here is that we're using the sha hasher for speed, as it's recommended to use a fast hasher during tests. Ref: https://docs.djangoproject.com/en/1.9/topics/testing/overview/#speeding-up-the-tests

I think a better fix here is to define PASSWORD_HASHERS in the test settings and change it to md5.

adevore commented 8 years ago

The new version uses PASSWORD_HASHERS. Note that 1.10a1 is not in the travis.yml file for django-ajax, so it has not been tested in a sandbox. I think adding 1.10a1 might cause a failure because six and mock are unlisted dependencies of django-ajax and the tests, respectively. I have an upcoming PR to fix that issue.

nicholasserra commented 8 years ago

Thank you. Looks like this PR needs rebased, or master merged in. Should be solid after that :)

nicholasserra commented 8 years ago

ping @adevore

Can you pull upstream into your fork and merge master into this branch? Or rebase. After that it should be good to go. Thanks :)