summaryrefslogtreecommitdiff
path: root/tests/auth_tests/test_hashers.py
diff options
context:
space:
mode:
authorMariusz Felisiak <felisiak.mariusz@gmail.com>2024-01-26 12:45:07 +0100
committerGitHub <noreply@github.com>2024-01-26 12:45:07 +0100
commit305757aec19c9d5111e4d76095ae0acd66163e4b (patch)
tree04aa017e66c06b3b19cb466ed4e1d73cd871523d /tests/auth_tests/test_hashers.py
parent3f6d939c62efd967f548c27a265748cc2cc47ca5 (diff)
Applied Black's 2024 stable style.
https://github.com/psf/black/releases/tag/24.1.0
Diffstat (limited to 'tests/auth_tests/test_hashers.py')
-rw-r--r--tests/auth_tests/test_hashers.py15
1 files changed, 9 insertions, 6 deletions
diff --git a/tests/auth_tests/test_hashers.py b/tests/auth_tests/test_hashers.py
index e0b640a998..1b0d2c65be 100644
--- a/tests/auth_tests/test_hashers.py
+++ b/tests/auth_tests/test_hashers.py
@@ -213,8 +213,9 @@ class TestUtilsHashPass(SimpleTestCase):
with mock.patch.object(hasher, "rounds", 4):
encoded = make_password("letmein", hasher="bcrypt")
- with mock.patch.object(hasher, "rounds", 6), mock.patch.object(
- hasher, "encode", side_effect=hasher.encode
+ with (
+ mock.patch.object(hasher, "rounds", 6),
+ mock.patch.object(hasher, "encode", side_effect=hasher.encode),
):
hasher.harden_runtime("wrong_password", encoded)
@@ -388,8 +389,9 @@ class TestUtilsHashPass(SimpleTestCase):
with mock.patch.object(hasher, "iterations", 1):
encoded = make_password("letmein")
- with mock.patch.object(hasher, "iterations", 6), mock.patch.object(
- hasher, "encode", side_effect=hasher.encode
+ with (
+ mock.patch.object(hasher, "iterations", 6),
+ mock.patch.object(hasher, "encode", side_effect=hasher.encode),
):
hasher.harden_runtime("wrong_password", encoded)
@@ -437,8 +439,9 @@ class TestUtilsHashPass(SimpleTestCase):
hasher = get_hasher("default")
encoded = make_password("letmein")
- with mock.patch.object(hasher, "harden_runtime"), mock.patch.object(
- hasher, "must_update", return_value=True
+ with (
+ mock.patch.object(hasher, "harden_runtime"),
+ mock.patch.object(hasher, "must_update", return_value=True),
):
# Correct password supplied, no hardening needed
check_password("letmein", encoded)