Code

Add compatibility package to allow us to deal with Python versions 2.3
[roundup.git] / test / test_hyperdbvals.py
index 9d01d4df681b685f25eda4caad8e3acbde7183ad..9b644421605a36f7a5afc70ad49c9c4e5da46c56 100644 (file)
@@ -10,7 +10,8 @@
 #
 # $Id: test_hyperdbvals.py,v 1.3 2006-08-18 01:26:19 richard Exp $
 
-import unittest, os, shutil, errno, sys, difflib, cgi, re, sha
+import unittest, os, shutil, errno, sys, difflib, cgi, re
+from roundup.anypy.hashlib_ import sha1
 
 from roundup import init, instance, password, hyperdb, date
 
@@ -80,7 +81,7 @@ class RawToHyperdbTest(unittest.TestCase):
         self.assert_(isinstance(val, password.Password))
         val = self._test('password', '{crypt}a string')
         self.assert_(isinstance(val, password.Password))
-        s = sha.sha('a string').hexdigest()
+        s = sha1('a string').hexdigest()
         val = self._test('password', '{SHA}'+s)
         self.assert_(isinstance(val, password.Password))
         self.assertEqual(val, 'a string')