Remove length arguments, add tests for unixinfo.GidToSid and unixinfo.UidToSid.
authorJelmer Vernooij <jelmer@samba.org>
Tue, 8 Apr 2008 12:58:38 +0000 (14:58 +0200)
committerJelmer Vernooij <jelmer@samba.org>
Tue, 8 Apr 2008 12:58:38 +0000 (14:58 +0200)
(This used to be commit cae61e32e5b61a02c2986b74bd1d7e58460b1e80)

source4/scripting/python/samba/tests/dcerpc/rpcecho.py
source4/scripting/python/samba/tests/dcerpc/unix.py

index 8c1a8bec71325c94dc1792ac2c74e5f931a34dee..484af9490ce579404925bc049070c841c77e8a3a 100644 (file)
@@ -30,7 +30,7 @@ class RpcEchoTests(unittest.TestCase):
         self.assertEquals(2, self.conn.AddOne(1))
 
     def test_echodata(self):
-        self.assertEquals([1,2,3], self.conn.EchoData(3, [1, 2, 3]))
+        self.assertEquals([1,2,3], self.conn.EchoData([1, 2, 3]))
 
     def test_call(self):
         self.assertEquals(u"foobar", self.conn.TestCall(u"foobar"))
index 99c84c08da62f0332c526c994c89c21454c915d8..b2577ec898fba7fedaeca4aadb0152d1312c9a72 100644 (file)
@@ -26,5 +26,11 @@ class UnixinfoTests(unittest.TestCase):
         self.conn = unixinfo.unixinfo("ncalrpc:", get_loadparm())
 
     def test_getpwuid(self):
-        (count, infos) = self.conn.GetPWUid(1, [0])
-        self.assertEquals(1, len(infos))
+        infos = self.conn.GetPWUid(range(512))
+        self.assertEquals(512, len(infos))
+
+    def test_gidtosid(self):
+        self.conn.GidToSid(1000)
+
+    def test_uidtosid(self):
+        self.conn.UidToSid(1000)