Test python binding for package_PackagesBlob
[metze/samba/wip.git] / python / samba / tests / password_hash_gpgme.py
index 42cd71d3e0812bed3e5901e59708ef50f5388a88..6f27821a8e5c1830c4ac760f7c83a3854bd9814b 100644 (file)
@@ -81,6 +81,13 @@ class PassWordHashGpgmeTests(PassWordHashTests):
                              binascii.a2b_hex(wd_package.data))
         self.check_wdigests(digests)
 
+        # Check that the Package names are correct.
+        #
+        pb = ndr_unpack(drsblobs.package_PackagesBlob,
+                             binascii.a2b_hex(package.data))
+        expected = ["Kerberos-Newer-Keys", "Kerberos", "WDigest", "SambaGPG"]
+        self.assertEquals(expected, pb.names)
+
     def test_supplementalCredentials_cleartext(self):
         self.add_user(clear_text=True)
         if not self.lp.get("password hash gpg key ids"):