summaryrefslogtreecommitdiff
path: root/passlib
diff options
context:
space:
mode:
Diffstat (limited to 'passlib')
-rw-r--r--passlib/tests/test_crypto_scrypt.py2
-rw-r--r--passlib/tests/utils.py3
2 files changed, 4 insertions, 1 deletions
diff --git a/passlib/tests/test_crypto_scrypt.py b/passlib/tests/test_crypto_scrypt.py
index 578a7aa..73ff1fa 100644
--- a/passlib/tests/test_crypto_scrypt.py
+++ b/passlib/tests/test_crypto_scrypt.py
@@ -550,7 +550,7 @@ class _CommonScryptTest(TestCase):
self.assertEqual(run_scrypt(1), 'da')
# pick random value
- ksize = rng.randint(0, 1 << 10)
+ ksize = rng.randint(1, 1 << 10)
self.assertEqual(len(run_scrypt(ksize)), 2*ksize) # 2 hex chars per output
# one more than upper bound
diff --git a/passlib/tests/utils.py b/passlib/tests/utils.py
index c9311b3..d2fd6b1 100644
--- a/passlib/tests/utils.py
+++ b/passlib/tests/utils.py
@@ -366,6 +366,9 @@ class TestCase(_TestCase):
ctx.__enter__()
self.addCleanup(ctx.__exit__)
+ # ignore security warnings, tests may deliberately cause these
+ warnings.filterwarnings("ignore", category=exc.PasslibSecurityWarning)
+
# ignore warnings about PasswordHash features deprecated in 1.7
# TODO: should be cleaned in 2.0, when support will be dropped.
# should be kept until then, so we test the legacy paths.