passlib: use hash() instead of deprecated encrypt()
This commit is contained in:
parent
94bb4fbdae
commit
1a26df865c
@ -57,7 +57,7 @@ class Auth(auth.BaseAuth):
|
|||||||
# A call to `encrypt` raises passlib.exc.MissingBackendError with a
|
# A call to `encrypt` raises passlib.exc.MissingBackendError with a
|
||||||
# good error message if bcrypt backend is not available. Trigger
|
# good error message if bcrypt backend is not available. Trigger
|
||||||
# this here.
|
# this here.
|
||||||
bcrypt.encrypt("test-bcrypt-backend")
|
bcrypt.hash("test-bcrypt-backend")
|
||||||
self.verify = functools.partial(self._bcrypt, bcrypt)
|
self.verify = functools.partial(self._bcrypt, bcrypt)
|
||||||
elif self.encryption == "crypt":
|
elif self.encryption == "crypt":
|
||||||
try:
|
try:
|
||||||
|
@ -106,7 +106,7 @@ class TestBaseAuthRequests(BaseTest):
|
|||||||
except ImportError:
|
except ImportError:
|
||||||
pytest.skip("passlib is not installed")
|
pytest.skip("passlib is not installed")
|
||||||
try:
|
try:
|
||||||
bcrypt.encrypt("test-bcrypt-backend")
|
bcrypt.hash("test-bcrypt-backend")
|
||||||
except MissingBackendError:
|
except MissingBackendError:
|
||||||
pytest.skip("bcrypt backend for passlib is not installed")
|
pytest.skip("bcrypt backend for passlib is not installed")
|
||||||
self._test_htpasswd(
|
self._test_htpasswd(
|
||||||
|
Loading…
Reference in New Issue
Block a user