diff options
| author | Eli Collins <elic@assurancetechnologies.com> | 2011-07-11 00:29:40 -0400 |
|---|---|---|
| committer | Eli Collins <elic@assurancetechnologies.com> | 2011-07-11 00:29:40 -0400 |
| commit | 6ae6c46b534aec9bdadc42226dce9a62fd1c6b89 (patch) | |
| tree | 203a6c4cd2bb9b83105f76c854bf8ec217fbc4c7 /passlib/utils | |
| parent | 27ed0f1ac703ae68d86a9b18505c76bdbe045612 (diff) | |
| download | passlib-6ae6c46b534aec9bdadc42226dce9a62fd1c6b89.tar.gz | |
added test for builtin MD4 class even if SSL version present, for coverage
Diffstat (limited to 'passlib/utils')
| -rw-r--r-- | passlib/utils/md4.py | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/passlib/utils/md4.py b/passlib/utils/md4.py index 0e70f1e..ba706aa 100644 --- a/passlib/utils/md4.py +++ b/passlib/utils/md4.py @@ -192,7 +192,7 @@ class md4(object): return def copy(self): - other = md4() + other = _builtin_md4() other._count = self._count other._state = list(self._state) other._buf = self._buf @@ -229,6 +229,9 @@ class md4(object): #eoc #========================================================================= +#keep ref around for unittest, 'md4' usually replaced by ssl wrapper, below. +_builtin_md4 = md4 + #========================================================================= #check if hashlib provides accelarated md4 #========================================================================= @@ -252,7 +255,7 @@ def _has_native_md4(): warn("native md4 support disabled, incorrect value returned") return False -if _has_native_md4(): +if _has_native_md4(): #overwrite md4 class w/ hashlib wrapper def md4(content=None): "wrapper for hashlib.new('md4')" |
