Move get_loadparm() and get_credentials() to samba.tests.TestCase.
authorJelmer Vernooij <jelmer@samba.org>
Wed, 15 Dec 2010 13:57:43 +0000 (14:57 +0100)
committerJelmer Vernooij <jelmer@samba.org>
Wed, 15 Dec 2010 13:57:43 +0000 (14:57 +0100)
source4/scripting/python/samba/tests/__init__.py

index 29016ea44c2c5098c3b9858c83277083ecf23b5b..10826ab4832ea9bdd8b14e44ddbc4b03edf395a7 100644 (file)
@@ -29,10 +29,22 @@ import subprocess
 import tempfile
 
 # Other modules import these two classes from here, for convenience:
-from testtools.testcase import TestCase, TestSkipped
+from testtools.testcase import (
+    TestCase as TesttoolsTestCase,
+    TestSkipped,
+    )
 
 
-class LdbTestCase(TestCase):
+class TestCase(TesttoolsTestCase):
+
+    def get_loadparm(self):
+        return env_loadparm()
+
+    def get_credentials(self):
+        return cmdline_credentials
+
+
+class LdbTestCase(TesttoolsTestCase):
     """Trivial test case for running tests against a LDB."""
 
     def setUp(self):
@@ -84,12 +96,7 @@ def env_get_var_value(var_name):
 cmdline_credentials = None
 
 class RpcInterfaceTestCase(TestCase):
-
-    def get_loadparm(self):
-        return env_loadparm()
-
-    def get_credentials(self):
-        return cmdline_credentials
+    """DCE/RPC Test case."""
 
 
 class ValidNetbiosNameTests(TestCase):