1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-15 23:24:37 +03:00

r26204: Binsings for some more functions.

(This used to be commit ab6be3086f7ad8c22e6f4805bccad5a04c0325f2)
This commit is contained in:
Jelmer Vernooij 2007-11-29 16:01:11 +01:00 committed by Stefan Metzmacher
parent cef98aaf27
commit 0e191fa26a
2 changed files with 12 additions and 0 deletions

View File

@ -89,5 +89,9 @@ typedef struct cli_credentials {
bool is_anonymous(void);
const struct samr_Password *get_nt_hash(TALLOC_CTX *mem_ctx);
bool authentication_requested();
bool wrong_password();
}
} cli_credentials;

View File

@ -82,3 +82,11 @@ class CredentialsTests(unittest.TestCase):
def test_guess(self):
# Just check the method is there and doesn't raise an exception
self.creds.guess()
def test_authentication_requested(self):
self.assertFalse(self.creds.authentication_requested())
def test_wrong_password(self):
self.assertTrue(self.creds.wrong_password())
self.assertTrue(self.creds.wrong_password())
self.assertFalse(self.creds.wrong_password())