python/samba/tests: port samba.tests.unix for py3
authorNoel Power <noel.power@suse.com>
Tue, 17 Apr 2018 10:56:40 +0000 (11:56 +0100)
committerAndrew Bartlett <abartlet@samba.org>
Mon, 3 Sep 2018 01:22:20 +0000 (03:22 +0200)
L for long literal is no longer valid in Python3, also
long keyword has been removed. int and long have been unified
in python3. A duplicated test has been removed (for long and
int) only the int test remains now.
Signed-off-by: Noel Power <noel.power@suse.com>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
python/samba/tests/dcerpc/unix.py

index c7e938af851dae349881c475fedaa06ced034060..cfca825c91a8d4c4ede5ef17c9fdf6be59f23e04 100644 (file)
@@ -32,16 +32,10 @@ class UnixinfoTests(RpcInterfaceTestCase):
         infos = self.conn.GetPWUid(range(512))
         self.assertEquals(512, len(infos))
         self.assertEquals("/bin/false", infos[0].shell)
-        self.assertTrue(isinstance(infos[0].homedir, unicode))
-
-    def test_getpwuid(self):
-        infos = self.conn.GetPWUid(map(long, range(512)))
-        self.assertEquals(512, len(infos))
-        self.assertEquals("/bin/false", infos[0].shell)
-        self.assertTrue(isinstance(infos[0].homedir, unicode))
+        self.assertTrue(isinstance(infos[0].homedir, txt_type))
 
     def test_gidtosid(self):
-        self.conn.GidToSid(1000L)
+        self.conn.GidToSid(1000)
 
     def test_uidtosid(self):
         self.conn.UidToSid(1000)