s4/torture/drs: port samba4.drs.delete_object test for py2/py3
authorNoel Power <noel.power@suse.com>
Thu, 14 Jun 2018 16:12:30 +0000 (17:12 +0100)
committerAndrew Bartlett <abartlet@samba.org>
Sat, 15 Sep 2018 13:18:28 +0000 (15:18 +0200)
Signed-off-by: Noel Power <noel.power@suse.com>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
source4/torture/drs/python/delete_object.py

index 5ccd8fd29b6744604b4c6fb92841ba9435c0ee1e..5d45462adc5d4be5810419988e7dcd8e79e86188 100644 (file)
@@ -70,12 +70,12 @@ class DrsDeleteObjectTestCase(drs_base.DrsBaseTestCase):
         # Deleted Object base DN
         dodn = self._deleted_objects_dn(sam_ldb)
         # now check properties of the user
-        cn_orig = obj_orig["cn"][0]
-        cn_cur  = user_cur["cn"][0]
-        name_orig = obj_orig["name"][0]
-        name_cur  = user_cur["name"][0]
+        cn_orig = str(obj_orig["cn"][0])
+        cn_cur  = str(user_cur["cn"][0])
+        name_orig = str(obj_orig["name"][0])
+        name_cur  = str(user_cur["name"][0])
         if is_deleted:
-            self.assertEquals(user_cur["isDeleted"][0], "TRUE")
+            self.assertEquals(str(user_cur["isDeleted"][0]), "TRUE")
             self.assertFalse("objectCategory" in user_cur)
             self.assertFalse("sAMAccountType" in user_cur)
             self.assertFalse("description" in user_cur)