'If the password returned by any function is C{""}, C{"x"}, or C{"*"} it
is not compared against the supplied password.  Instead it is skipped.'

def test_failOnSpecial(self):

    pwd = UserDatabase()
    pwd.addUser('alice', '', 1, 2, '', 'foo', 'bar')
    pwd.addUser('bob', 'x', 1, 2, '', 'foo', 'bar')
    pwd.addUser('carol', '*', 1, 2, '', 'foo', 'bar')
    self.patch(checkers, 'pwd', pwd)
    checker = checkers.UNIXPasswordDatabase([checkers._pwdGetByName])
    cred = UsernamePassword('alice', '')
    self.assertUnauthorizedLogin(checker.requestAvatarId(cred))
    cred = UsernamePassword('bob', 'x')
    self.assertUnauthorizedLogin(checker.requestAvatarId(cred))
    cred = UsernamePassword('carol', '*')
    self.assertUnauthorizedLogin(checker.requestAvatarId(cred))
