mirror of
https://github.com/Kozea/Radicale.git
synced 2025-08-01 18:18:31 +00:00
Always test bcrypt
This commit is contained in:
parent
156ce91f35
commit
5aa2f59b38
3 changed files with 4 additions and 16 deletions
|
@ -44,16 +44,6 @@ class TestBaseAuthRequests(BaseTest):
|
|||
"""Test htpasswd authentication with user "tmp" and password "bepo" for
|
||||
``test_matrix`` "ascii" or user "😀" and password "🔑" for
|
||||
``test_matrix`` "unicode"."""
|
||||
if htpasswd_encryption == "bcrypt":
|
||||
try:
|
||||
from passlib.exc import MissingBackendError
|
||||
from passlib.hash import bcrypt
|
||||
except ImportError:
|
||||
pytest.skip("passlib[bcrypt] is not installed")
|
||||
try:
|
||||
bcrypt.hash("test-bcrypt-backend")
|
||||
except MissingBackendError:
|
||||
pytest.skip("bcrypt backend for passlib is not installed")
|
||||
htpasswd_file_path = os.path.join(self.colpath, ".htpasswd")
|
||||
encoding: str = self.configuration.get("encoding", "stock")
|
||||
with open(htpasswd_file_path, "w", encoding=encoding) as f:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue