From 3914735ec0e1a28ddd325d3ebfafbfeb4e522d78 Mon Sep 17 00:00:00 2001 From: Peter Bieringer Date: Tue, 18 Feb 2025 06:13:39 +0100 Subject: [PATCH] skip bcrypt related tests if module is missing --- radicale/tests/test_auth.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/radicale/tests/test_auth.py b/radicale/tests/test_auth.py index 7abb23e9..6745e665 100644 --- a/radicale/tests/test_auth.py +++ b/radicale/tests/test_auth.py @@ -99,10 +99,12 @@ class TestBaseAuthRequests(BaseTest): def test_htpasswd_sha512(self) -> None: self._test_htpasswd("sha512", "tmp:$6$3Qhl8r6FLagYdHYa$UCH9yXCed4A.J9FQsFPYAOXImzZUMfvLa0lwcWOxWYLOF5sE/lF99auQ4jKvHY2vijxmefl7G6kMqZ8JPdhIJ/") + @pytest.mark.skipif(has_bcrypt == 0, reason="No bcrypt module installed") def test_htpasswd_bcrypt(self) -> None: self._test_htpasswd("bcrypt", "tmp:$2y$05$oD7hbiQFQlvCM7zoalo/T.MssV3V" "NTRI3w5KDnj8NTUKJNWfVpvRq") + @pytest.mark.skipif(has_bcrypt == 0, reason="No bcrypt module installed") def test_htpasswd_bcrypt_unicode(self) -> None: self._test_htpasswd("bcrypt", "😀:$2y$10$Oyz5aHV4MD9eQJbk6GPemOs4T6edK" "6U9Sqlzr.W1mMVCS8wJUftnW", "unicode")