$OpenBSD: patch-test_units_utils_test_encrypt_py,v 1.1.1.1 2021/06/14 19:28:44 pvk Exp $

Index: test/units/utils/test_encrypt.py
--- test/units/utils/test_encrypt.py.orig
+++ test/units/utils/test_encrypt.py
@@ -51,7 +51,7 @@ def assert_hash(expected, secret, algorithm, **setting
         assert excinfo.value.args[0] == "passlib must be installed and usable to hash with '%s'" % algorithm
 
 
-@pytest.mark.skipif(sys.platform.startswith('darwin'), reason='macOS requires passlib')
+@pytest.mark.skipif(sys.platform.startswith(('darwin', 'openbsd')), reason='macOS and OpenBSD require passlib')
 def test_encrypt_with_rounds_no_passlib():
     with passlib_off():
         assert_hash("$5$12345678$uAZsE3BenI2G.nA8DpTl.9Dc8JiqacI53pEqRr5ppT7",
@@ -73,7 +73,7 @@ def test_encrypt_with_rounds():
                 secret="123", algorithm="sha512_crypt", salt="12345678", rounds=5000)
 
 
-@pytest.mark.skipif(sys.platform.startswith('darwin'), reason='macOS requires passlib')
+@pytest.mark.skipif(sys.platform.startswith(('darwin', 'openbsd')), reason='macOS and OpenBSD require passlib')
 def test_encrypt_default_rounds_no_passlib():
     with passlib_off():
         assert_hash("$1$12345678$tRy4cXc3kmcfRZVj4iFXr/",
@@ -99,7 +99,7 @@ def test_encrypt_default_rounds():
     assert encrypt.PasslibHash("md5_crypt").hash("123")
 
 
-@pytest.mark.skipif(sys.platform.startswith('darwin'), reason='macOS requires passlib')
+@pytest.mark.skipif(sys.platform.startswith(('darwin', 'openbsd')), reason='macOS and OpenBSD require passlib')
 def test_password_hash_filter_no_passlib():
     with passlib_off():
         assert not encrypt.PASSLIB_AVAILABLE
@@ -135,7 +135,7 @@ def test_password_hash_filter_passlib():
     assert get_encrypted_password("123", "pbkdf2_sha256")
 
 
-@pytest.mark.skipif(sys.platform.startswith('darwin'), reason='macOS requires passlib')
+@pytest.mark.skipif(sys.platform.startswith(('darwin', 'openbsd')), reason='macOS and OpenBSD require passlib')
 def test_do_encrypt_no_passlib():
     with passlib_off():
         assert not encrypt.PASSLIB_AVAILABLE
