summaryrefslogtreecommitdiff
path: root/source4
diff options
context:
space:
mode:
authorJelmer Vernooij <jelmer@samba.org>2008-04-14 23:30:17 +0200
committerJelmer Vernooij <jelmer@samba.org>2008-04-14 23:30:17 +0200
commit91baa45dfd3cc56e3b97876d1ec4d6a4b48fbaab (patch)
tree08bf467f32dd6ad38b2d4323910f5a88c68ffa42 /source4
parentb1bdcd4a8a11f28b2750a26b46983cc6b1c1bf5e (diff)
parent1b5f32128d1867829647a4e1f20b6e8363444f66 (diff)
downloadsamba-91baa45dfd3cc56e3b97876d1ec4d6a4b48fbaab.tar.gz
samba-91baa45dfd3cc56e3b97876d1ec4d6a4b48fbaab.tar.bz2
samba-91baa45dfd3cc56e3b97876d1ec4d6a4b48fbaab.zip
Merge branch 'v4-0-test' of ssh://git.samba.org/data/git/samba into v4-0-gmake4
(This used to be commit 0239011ced6c864f85b47a342438228a8f6940ee)
Diffstat (limited to 'source4')
-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,