summaryrefslogtreecommitdiff
path: root/source4/scripting/python
diff options
context:
space:
mode:
authorJelmer Vernooij <jelmer@samba.org>2008-04-14 23:28:14 +0200
committerJelmer Vernooij <jelmer@samba.org>2008-04-14 23:28:14 +0200
commit1b5f32128d1867829647a4e1f20b6e8363444f66 (patch)
treed585ef73b8827a44f8454150cd64cab00d9a45a6 /source4/scripting/python
parent9b503470769e1f808c4bdafafba0b93e2ede3bd6 (diff)
downloadsamba-1b5f32128d1867829647a4e1f20b6e8363444f66.tar.gz
samba-1b5f32128d1867829647a4e1f20b6e8363444f66.tar.bz2
samba-1b5f32128d1867829647a4e1f20b6e8363444f66.zip
Use RpcInterfaceTestCase everywhere.
(This used to be commit 799095b4e567f4495adf7d1d7bcb81dda6782959)
Diffstat (limited to 'source4/scripting/python')
-rw-r--r--source4/scripting/python/samba/tests/dcerpc/registry.py4
-rw-r--r--source4/scripting/python/samba/tests/dcerpc/rpcecho.py7
-rw-r--r--source4/scripting/python/samba/tests/dcerpc/sam.py7
-rw-r--r--source4/scripting/python/samba/tests/dcerpc/unix.py7
-rw-r--r--source4/scripting/python/samba/tests/provision.py2
-rw-r--r--source4/scripting/python/samba/tests/samdb.py4
6 files changed, 14 insertions, 17 deletions
diff --git a/source4/scripting/python/samba/tests/dcerpc/registry.py b/source4/scripting/python/samba/tests/dcerpc/registry.py
index 05ac7c66ee..1afdc582a7 100644
--- a/source4/scripting/python/samba/tests/dcerpc/registry.py
+++ b/source4/scripting/python/samba/tests/dcerpc/registry.py
@@ -23,8 +23,8 @@ from samba.tests import RpcInterfaceTestCase
class WinregTests(RpcInterfaceTestCase):
def setUp(self):
- lp = self.get_loadparm()
- self.conn = winreg.winreg("ncalrpc:", lp, self.get_credentials())
+ self.conn = winreg.winreg("ncalrpc:", self.get_loadparm(),
+ self.get_credentials())
def get_hklm(self):
return self.conn.OpenHKLM(None,
diff --git a/source4/scripting/python/samba/tests/dcerpc/rpcecho.py b/source4/scripting/python/samba/tests/dcerpc/rpcecho.py
index 484af9490c..6c43632d97 100644
--- a/source4/scripting/python/samba/tests/dcerpc/rpcecho.py
+++ b/source4/scripting/python/samba/tests/dcerpc/rpcecho.py
@@ -19,12 +19,11 @@
import echo
import unittest
-from samba.tests import get_loadparm
+from samba.tests import RpcInterfaceTestCase
-class RpcEchoTests(unittest.TestCase):
+class RpcEchoTests(RpcInterfaceTestCase):
def setUp(self):
- lp_ctx = get_loadparm()
- self.conn = echo.rpcecho("ncalrpc:", lp_ctx)
+ self.conn = echo.rpcecho("ncalrpc:", self.get_loadparm())
def test_addone(self):
self.assertEquals(2, self.conn.AddOne(1))
diff --git a/source4/scripting/python/samba/tests/dcerpc/sam.py b/source4/scripting/python/samba/tests/dcerpc/sam.py
index 96348f2f69..8ef12dad86 100644
--- a/source4/scripting/python/samba/tests/dcerpc/sam.py
+++ b/source4/scripting/python/samba/tests/dcerpc/sam.py
@@ -18,12 +18,11 @@
#
import samr
-import unittest
-from samba.tests import get_loadparm
+from samba.tests import RpcInterfaceTestCase
-class SamrTests(unittest.TestCase):
+class SamrTests(RpcInterfaceTestCase):
def setUp(self):
- self.conn = samr.samr("ncalrpc:", get_loadparm())
+ self.conn = samr.samr("ncalrpc:", self.get_loadparm())
def test_connect5(self):
(level, info, handle) = self.conn.Connect5(None, 0, 1, samr.ConnectInfo1())
diff --git a/source4/scripting/python/samba/tests/dcerpc/unix.py b/source4/scripting/python/samba/tests/dcerpc/unix.py
index b2577ec898..bfddfdc7ec 100644
--- a/source4/scripting/python/samba/tests/dcerpc/unix.py
+++ b/source4/scripting/python/samba/tests/dcerpc/unix.py
@@ -18,12 +18,11 @@
#
import unixinfo
-import unittest
-from samba.tests import get_loadparm
+from samba.tests import RpcInterfaceTestCase
-class UnixinfoTests(unittest.TestCase):
+class UnixinfoTests(RpcInterfaceTestCase):
def setUp(self):
- self.conn = unixinfo.unixinfo("ncalrpc:", get_loadparm())
+ self.conn = unixinfo.unixinfo("ncalrpc:", self.get_loadparm())
def test_getpwuid(self):
infos = self.conn.GetPWUid(range(512))
diff --git a/source4/scripting/python/samba/tests/provision.py b/source4/scripting/python/samba/tests/provision.py
index 514582cbe4..b9e0e16d3c 100644
--- a/source4/scripting/python/samba/tests/provision.py
+++ b/source4/scripting/python/samba/tests/provision.py
@@ -24,7 +24,7 @@ from ldb import Dn
import param
import unittest
-lp = samba.tests.get_loadparm()
+lp = samba.tests.cmdline_loadparm
setup_dir = "setup"
def setup_path(file):
diff --git a/source4/scripting/python/samba/tests/samdb.py b/source4/scripting/python/samba/tests/samdb.py
index 3745dba6fc..0e175bf936 100644
--- a/source4/scripting/python/samba/tests/samdb.py
+++ b/source4/scripting/python/samba/tests/samdb.py
@@ -21,7 +21,7 @@ from credentials import Credentials
import os
from samba.provision import setup_samdb
from samba.samdb import SamDB
-from samba.tests import get_loadparm, TestCaseInTempDir
+from samba.tests import cmdline_loadparm, TestCaseInTempDir
import security
from unittest import TestCase
import uuid
@@ -43,7 +43,7 @@ class SamDBTestCase(TestCaseInTempDir):
hostguid = uuid.random()
path = os.path.join(self.tempdir, "samdb.ldb")
self.samdb = setup_samdb(path, setup_path, system_session(), creds,
- get_loadparm(), schemadn, configdn,
+ cmdline_loadparm, schemadn, configdn,
self.domaindn, "example.com", "EXAMPLE.COM",
"FOO", lambda x: None, "foo", domaindn,
False, domainsid, "# no aci", domainguid,