Tres Seaver
2009-05-08 2091d4d32d3e0fd1c1efc51a0f51c3bb9e87ec07
repoze/who/plugins/tests/test_htpasswd.py
@@ -117,6 +117,19 @@
        self.assertEqual(crypt_check('password', hashed), True)
        self.assertEqual(crypt_check('notpassword', hashed), False)
    def test_plain_check(self):
        from repoze.who.plugins.htpasswd import plain_check
        self.failUnless(plain_check('password', 'password'))
        self.failIf(plain_check('notpassword', 'password'))
    def test_factory_no_filename_raises(self):
        from repoze.who.plugins.htpasswd import make_plugin
        self.assertRaises(ValueError, make_plugin)
    def test_factory_no_check_fn_raises(self):
        from repoze.who.plugins.htpasswd import make_plugin
        self.assertRaises(ValueError, make_plugin, 'foo')
    def test_factory(self):
        from repoze.who.plugins.htpasswd import make_plugin
        from repoze.who.plugins.htpasswd import crypt_check