comparison MoinMoin/config/_tests/test_multiconfig.py @ 3323:fb625b97ca02

remove crack password checker test now that password checker was removed...
author Johannes Berg <johannes AT sipsolutions DOT net>
date Wed, 19 Mar 2008 03:50:30 +0100
parents 5e7b45489430
children 6049339db18f
comparison
equal deleted inserted replaced
3322:dd519c814149 3323:fb625b97ca02
38 for pw, result in self.tests_builtin: 38 for pw, result in self.tests_builtin:
39 pw_error = pw_checker(self.username, pw) 39 pw_error = pw_checker(self.username, pw)
40 print "%r: %s" % (pw, pw_error) 40 print "%r: %s" % (pw, pw_error)
41 assert result == (pw_error is None) 41 assert result == (pw_error is None)
42 42
43 def testCrackPasswordChecker(self):
44 pw_checker = self.request.cfg.password_checker
45 if not pw_checker:
46 py.test.skip("password_checker is disabled in the configuration, not testing it")
47 else:
48 try:
49 import crack # do we have python-crack?
50 except:
51 py.test.skip("python-crack is not installed")
52 try:
53 crack.FascistCheck("a12fv./ZX47") # this should not raise an exception
54 except:
55 py.test.skip("python-crack is not working correctly (did you forget to build the dicts?)")
56 else:
57 for pw, result in self.tests_crack:
58 pw_error = pw_checker(self.username, pw)
59 print "%r: %s" % (pw, pw_error)
60 assert result == (pw_error is None)
61
62 coverage_modules = ['MoinMoin.config.multiconfig'] 43 coverage_modules = ['MoinMoin.config.multiconfig']
63 44