summaryrefslogtreecommitdiff
path: root/source4
diff options
context:
space:
mode:
authorJelmer Vernooij <jelmer@samba.org>2010-06-19 17:48:05 +0200
committerJelmer Vernooij <jelmer@samba.org>2010-06-19 22:46:44 +0200
commit026a4d85a1a909d2efe447bea36b941e01da7e42 (patch)
tree76399dd2f7e887feef3e4d331bfafc6721e23c9c /source4
parent5e67566f5e660a91c004aa606d1987fd7665f5dd (diff)
downloadsamba-026a4d85a1a909d2efe447bea36b941e01da7e42.tar.gz
samba-026a4d85a1a909d2efe447bea36b941e01da7e42.tar.bz2
samba-026a4d85a1a909d2efe447bea36b941e01da7e42.zip
samba.tests: Provide TestCase and TestSkipped classes (from testtools) for convenience.
Diffstat (limited to 'source4')
-rw-r--r--source4/scripting/python/samba/tests/__init__.py15
1 files changed, 9 insertions, 6 deletions
diff --git a/source4/scripting/python/samba/tests/__init__.py b/source4/scripting/python/samba/tests/__init__.py
index a5459f44b5..78c4676aa7 100644
--- a/source4/scripting/python/samba/tests/__init__.py
+++ b/source4/scripting/python/samba/tests/__init__.py
@@ -24,9 +24,12 @@ import ldb
import samba
from samba import param
import tempfile
-import unittest
-class LdbTestCase(unittest.TestCase):
+# Other modules import these two classes from here, for convenience:
+from testtools.testcase import TestCase, TestSkipped
+
+
+class LdbTestCase(TestCase):
"""Trivial test case for running tests against a LDB."""
def setUp(self):
@@ -42,7 +45,7 @@ class LdbTestCase(unittest.TestCase):
self.ldb = samba.Ldb(self.filename)
-class TestCaseInTempDir(unittest.TestCase):
+class TestCaseInTempDir(TestCase):
def setUp(self):
super(TestCaseInTempDir, self).setUp()
@@ -54,7 +57,7 @@ class TestCaseInTempDir(unittest.TestCase):
os.rmdir(self.tempdir)
-class SubstituteVarTestCase(unittest.TestCase):
+class SubstituteVarTestCase(TestCase):
def test_empty(self):
self.assertEquals("", samba.substitute_var("", {}))
@@ -101,7 +104,7 @@ def env_loadparm():
cmdline_credentials = None
-class RpcInterfaceTestCase(unittest.TestCase):
+class RpcInterfaceTestCase(TestCase):
def get_loadparm(self):
return env_loadparm()
@@ -110,7 +113,7 @@ class RpcInterfaceTestCase(unittest.TestCase):
return cmdline_credentials
-class ValidNetbiosNameTests(unittest.TestCase):
+class ValidNetbiosNameTests(TestCase):
def test_valid(self):
self.assertTrue(samba.valid_netbios_name("FOO"))