diff options
author | Eli Collins <elic@assurancetechnologies.com> | 2020-10-06 10:49:22 -0400 |
---|---|---|
committer | Eli Collins <elic@assurancetechnologies.com> | 2020-10-06 10:49:22 -0400 |
commit | da2546cdc6252639f1cd5bc94cb98f05389c8909 (patch) | |
tree | a5d490cbd55c72bba7595c8087814673fd06adc5 /passlib | |
parent | f0e6cded325b73fe7a848b005da5a32d501b09aa (diff) | |
download | passlib-da2546cdc6252639f1cd5bc94cb98f05389c8909.tar.gz |
passlib.tests: silenced some internal warnings; fixed edge case in scrypt test;
removed "gae" from tox suite (no meaningful difference from posix tests)
Diffstat (limited to 'passlib')
-rw-r--r-- | passlib/tests/test_crypto_scrypt.py | 2 | ||||
-rw-r--r-- | passlib/tests/utils.py | 3 |
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. |