From 3b16c532f21202696d54ef87f8fa74d066812898 Mon Sep 17 00:00:00 2001 From: Jelmer Vernooij Date: Mon, 14 Jan 2008 05:16:51 +0100 Subject: pidl/python: Pass credentials and loadparm context when connecting using DCE/RPC. (This used to be commit 4c87af95310e4aaee3f2e2da02d0ea70ed1ec25b) --- source4/scripting/python/samba/tests/dcerpc/rpcecho.py | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) (limited to 'source4/scripting/python') diff --git a/source4/scripting/python/samba/tests/dcerpc/rpcecho.py b/source4/scripting/python/samba/tests/dcerpc/rpcecho.py index cedd0cc2fe..52a4f49bb4 100644 --- a/source4/scripting/python/samba/tests/dcerpc/rpcecho.py +++ b/source4/scripting/python/samba/tests/dcerpc/rpcecho.py @@ -18,22 +18,25 @@ # import echo +from param import LoadParm import unittest class RpcEchoTests(unittest.TestCase): def setUp(self): - self.conn = echo.rpcecho("ncalrpc:") + lp_ctx = LoadParm() + lp_ctx.load("st/client/client.conf") + self.conn = echo.rpcecho("ncalrpc:", lp_ctx) def test_addone(self): - self.assertEquals(2, conn.AddOne(1)) + self.assertEquals(2, self.conn.AddOne(1)) def test_echodata(self): - self.assertEquals("bla", conn.EchoData(3, "bla")) + self.assertEquals("bla", self.conn.EchoData(3, "bla")) def test_call(self): - self.assertEquals("foobar", conn.TestCall("foobar")) + self.assertEquals("foobar", self.conn.TestCall("foobar")) def test_surrounding(self): somearray = [1,2,3,4] - (y,) = conn.TestSurrounding(echo.Surrounding(4, somearray)) + (y,) = self.conn.TestSurrounding(echo.Surrounding(4, somearray)) self.assertEquals(8 * [0], y.surrounding) -- cgit