summaryrefslogtreecommitdiff
path: root/passlib/tests
diff options
context:
space:
mode:
authorEli Collins <elic@assurancetechnologies.com>2012-01-05 21:42:45 -0500
committerEli Collins <elic@assurancetechnologies.com>2012-01-05 21:42:45 -0500
commite6f618be80f36b9a7b1d4eed97e39c927120ea2e (patch)
tree47442f253f4cfb26e1676b35b49556fe79f59492 /passlib/tests
parentf7a33447fec5219842c15eef560ca067f4ec06c3 (diff)
downloadpasslib-e6f618be80f36b9a7b1d4eed97e39c927120ea2e.tar.gz
renamed utils.timer -> utils.tick
Diffstat (limited to 'passlib/tests')
-rw-r--r--passlib/tests/test_context.py10
1 files changed, 5 insertions, 5 deletions
diff --git a/passlib/tests/test_context.py b/passlib/tests/test_context.py
index a6f9f60..bb2f78c 100644
--- a/passlib/tests/test_context.py
+++ b/passlib/tests/test_context.py
@@ -18,7 +18,7 @@ except ImportError:
#pkg
from passlib import hash
from passlib.context import CryptContext, CryptPolicy, LazyCryptContext
-from passlib.utils import to_bytes, to_unicode, PasslibPolicyWarning
+from passlib.utils import to_bytes, to_unicode, PasslibPolicyWarning, tick
from passlib.utils.compat import irange, u
import passlib.utils.handlers as uh
from passlib.tests.utils import TestCase, mktemp, catch_warnings, \
@@ -917,8 +917,8 @@ class CryptContextTest(TestCase):
def test_24_min_verify_time(self):
"test verify() honors min_verify_time"
- #NOTE: this whole test assumes time.sleep() and time.time()
- # have at least 1ms accuracy
+ #NOTE: this whole test assumes time.sleep() and tick()
+ # have better than 100ms accuracy - set via delta.
delta = .1
min_delay = delta
min_verify_time = min_delay + 2*delta
@@ -941,9 +941,9 @@ class CryptContextTest(TestCase):
cc = CryptContext([TimedHash], min_verify_time=min_verify_time)
def timecall(func, *args, **kwds):
- start = time.time()
+ start = tick()
result = func(*args, **kwds)
- end = time.time()
+ end = tick()
return end-start, result
#verify hashing works