r26204: Binsings for some more functions.
authorJelmer Vernooij <jelmer@samba.org>
Thu, 29 Nov 2007 15:01:11 +0000 (16:01 +0100)
committerStefan Metzmacher <metze@samba.org>
Fri, 21 Dec 2007 04:46:50 +0000 (05:46 +0100)
source/auth/credentials/credentials.i
source/auth/credentials/tests/bindings.py

index 2edda111b4ffe69a3bd8e185547f643323c5e87a..e694f933513c9eca7c249f4718f8c6482f26a922 100644 (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;
index 9bb49a12a5537299382c60ded5e5a60245b6b2ce..6253e8fbad7bff6046455cb8d0ded9ccb1cc02fa 100644 (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())