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>
if not samba.xattr_native.is_xattr_supported():
raise SkipTest()
tempf = self._tmpfilename()
if not samba.xattr_native.is_xattr_supported():
raise SkipTest()
tempf = self._tmpfilename()
- reftxt = "this is a test"
+ reftxt = b"this is a test"
open(tempf, 'w').write("empty")
try:
samba.xattr_native.wrap_setxattr(tempf, "user.unittests", reftxt)
open(tempf, 'w').write("empty")
try:
samba.xattr_native.wrap_setxattr(tempf, "user.unittests", reftxt)
def test_set_and_get_tdb(self):
tempf = self._tmpfilename()
eadb_path = self._eadbpath()
def test_set_and_get_tdb(self):
tempf = self._tmpfilename()
eadb_path = self._eadbpath()
- reftxt = "this is a test"
+ reftxt = b"this is a test"
open(tempf, 'w').write("empty")
try:
samba.xattr_tdb.wrap_setxattr(eadb_path, tempf, "user.unittests",
open(tempf, 'w').write("empty")
try:
samba.xattr_tdb.wrap_setxattr(eadb_path, tempf, "user.unittests",
def test_set_and_get_posix_eadb(self):
tempf = self._tmpfilename()
eadb_path = self._eadbpath()
def test_set_and_get_posix_eadb(self):
tempf = self._tmpfilename()
eadb_path = self._eadbpath()
- reftxt = "this is a test"
+ reftxt = b"this is a test"
open(tempf, 'w').write("empty")
try:
samba.posix_eadb.wrap_setxattr(eadb_path, tempf, "user.unittests",
open(tempf, 'w').write("empty")
try:
samba.posix_eadb.wrap_setxattr(eadb_path, tempf, "user.unittests",