summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEli Collins <elic@assurancetechnologies.com>2020-10-06 10:49:22 -0400
committerEli Collins <elic@assurancetechnologies.com>2020-10-06 10:49:22 -0400
commitda2546cdc6252639f1cd5bc94cb98f05389c8909 (patch)
treea5d490cbd55c72bba7595c8087814673fd06adc5
parentf0e6cded325b73fe7a848b005da5a32d501b09aa (diff)
downloadpasslib-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)
-rw-r--r--passlib/tests/test_crypto_scrypt.py2
-rw-r--r--passlib/tests/utils.py3
-rw-r--r--tox.ini24
3 files changed, 4 insertions, 25 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.
diff --git a/tox.ini b/tox.ini
index 252a68e..80d4981 100644
--- a/tox.ini
+++ b/tox.ini
@@ -83,7 +83,6 @@ envlist =
django-{wdeps,nodeps}-py{2,3},
# other tests
- gae-py27
docs
#===========================================================================
@@ -194,29 +193,6 @@ deps =
django{,1x,18}: mock
#===========================================================================
-# Google App Engine integration
-#
-# NOTE: for this to work, the GAE SDK should be installed in
-# /usr/local/google_appengine, or set nosegae's --gae-lib-root
-#
-# NOTE: not run by default
-#===========================================================================
-[testenv:gae-py27]
-basepython = python2.7
-deps =
- nose
- rednose
- nosegae
- unittest2
-changedir = {envdir}/lib/python2.7/site-packages
-commands =
- # setup custom app.yaml so GAE can run
- python -m passlib.tests.tox_support setup_gae . python27
-
- # run tests
- nosetests --with-gae {posargs:passlib/tests}
-
-#===========================================================================
# build documentation
#===========================================================================
[testenv:docs]