Skip to content


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

[1.4.x] Fixed #21248 -- Skipped test_bcrypt if no py-bcrypt found

Pre 1.6 Django worked only with py-bcrypt, not with bcrypt. Skipped
test_bcrypt when using bcrypt to avoid false positives.

Backpatch of 9f8a36e from stable/1.5.x.
  • Loading branch information...
commit 037ec1054ca8c08e65307f53e5851fe50ac5e8bf 1 parent e2403db
@akaariai akaariai authored
Showing with 4 additions and 0 deletions.
  1. +4 −0 django/contrib/auth/tests/
4 django/contrib/auth/tests/
@@ -14,6 +14,10 @@
import bcrypt
+ # Django 1.4 works only with py-bcrypt, not with bcrypt. py-bcrypt has
+ # '_bcrypt' attribute, bcrypt doesn't.
+ if not hasattr(bcrypt, '_bcrypt'):
+ bcrypt = None
except ImportError:
bcrypt = None
Please sign in to comment.
Something went wrong with that request. Please try again.