s4/torture/drs: py2/py3 compat changes for test samba4.drs.fsmo
authorNoel Power <noel.power@suse.com>
Fri, 15 Jun 2018 07:58:59 +0000 (08:58 +0100)
committerAndrew Bartlett <abartlet@samba.org>
Sat, 15 Sep 2018 13:18:29 +0000 (15:18 +0200)
Signed-off-by: Noel Power <noel.power@suse.com>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
source4/torture/drs/python/drs_base.py

index af809a610dd9372dc24dc63f38ef48a77eaeb58f..2e8598d529ba023ed8fabd09cc9ab6b98883138b 100644 (file)
@@ -65,14 +65,14 @@ class DrsBaseTestCase(SambaToolCmdTest):
         self.test_ldb_dc = self.ldb_dc1
 
         # cache some of RootDSE props
-        self.schema_dn = self.info_dc1["schemaNamingContext"][0]
-        self.domain_dn = self.info_dc1["defaultNamingContext"][0]
-        self.config_dn = self.info_dc1["configurationNamingContext"][0]
+        self.schema_dn = str(self.info_dc1["schemaNamingContext"][0])
+        self.domain_dn = str(self.info_dc1["defaultNamingContext"][0])
+        self.config_dn = str(self.info_dc1["configurationNamingContext"][0])
         self.forest_level = int(self.info_dc1["forestFunctionality"][0])
 
         # we will need DCs DNS names for 'samba-tool drs' command
-        self.dnsname_dc1 = self.info_dc1["dnsHostName"][0]
-        self.dnsname_dc2 = self.info_dc2["dnsHostName"][0]
+        self.dnsname_dc1 = str(self.info_dc1["dnsHostName"][0])
+        self.dnsname_dc2 = str(self.info_dc2["dnsHostName"][0])
 
         # for debugging the test code
         self._debug = False