selftest: enable py3 for samba.tests.posixacl
authorJoe Guo <joeg@catalyst.net.nz>
Thu, 5 Apr 2018 02:49:25 +0000 (14:49 +1200)
committerAndrew Bartlett <abartlet@samba.org>
Thu, 5 Apr 2018 06:59:09 +0000 (08:59 +0200)
Fix bytes and str issue.

Signed-off-by: Joe Guo <joeg@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
python/samba/tests/posixacl.py

index ef4ed77f13e05b252be0ab4ecfbcecb234dd6c51..74cabf1bb709e8faee6a33a7a5e71ef616476f2c 100644 (file)
@@ -82,7 +82,7 @@ class PosixAclMappingTests(TestCaseInTempDir):
         # This should invalidate the ACL, as we include the posix ACL in the hash
         (backend_obj, dbname) = checkset_backend(self.lp, None, None)
         backend_obj.wrap_setxattr(dbname,
-                                  self.tempf, "system.fake_access_acl", "")
+                                  self.tempf, "system.fake_access_acl", b"")
 
         #however, as this is direct DB access, we do not notice it
         facl = getntacl(self.lp, self.tempf, direct_db_access=True)
@@ -96,7 +96,7 @@ class PosixAclMappingTests(TestCaseInTempDir):
         # This should invalidate the ACL, as we include the posix ACL in the hash
         (backend_obj, dbname) = checkset_backend(self.lp, None, None)
         backend_obj.wrap_setxattr(dbname,
-                                  self.tempf, "system.fake_access_acl", "")
+                                  self.tempf, "system.fake_access_acl", b"")
 
         #the hash would break, and we return an ACL based only on the mode, except we set the ACL using the 'ntvfs' mode that doesn't include a hash
         facl = getntacl(self.lp, self.tempf)
@@ -112,7 +112,7 @@ class PosixAclMappingTests(TestCaseInTempDir):
         # This should invalidate the ACL, as we include the posix ACL in the hash
         (backend_obj, dbname) = checkset_backend(self.lp, None, None)
         backend_obj.wrap_setxattr(dbname,
-                                  self.tempf, "system.fake_access_acl", "")
+                                  self.tempf, "system.fake_access_acl", b"")
 
         #the hash will break, and we return an ACL based only on the mode
         facl = getntacl(self.lp, self.tempf, direct_db_access=False)