diff options
author | Jelmer Vernooij <jelmer@samba.org> | 2010-06-19 18:58:18 +0200 |
---|---|---|
committer | Jelmer Vernooij <jelmer@samba.org> | 2010-06-19 22:46:45 +0200 |
commit | c92db7b6dc31756fc461ea9f74e1cd675e3e160d (patch) | |
tree | 14a1cb47c782b42ab023e1e462447ee55ddeb179 /source4/lib/registry | |
parent | 105ebb34405eb458c51ebbfb57b3ce31a41c34e2 (diff) | |
download | samba-c92db7b6dc31756fc461ea9f74e1cd675e3e160d.tar.gz samba-c92db7b6dc31756fc461ea9f74e1cd675e3e160d.tar.xz samba-c92db7b6dc31756fc461ea9f74e1cd675e3e160d.zip |
python: Use samba.tests.TestCase, make sure base class tearDown and
setUp methods are called, fix formatting.
Diffstat (limited to 'source4/lib/registry')
-rw-r--r-- | source4/lib/registry/tests/bindings.py | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/source4/lib/registry/tests/bindings.py b/source4/lib/registry/tests/bindings.py index b5115aefa4..d01ebff909 100644 --- a/source4/lib/registry/tests/bindings.py +++ b/source4/lib/registry/tests/bindings.py @@ -18,11 +18,11 @@ # import os -import unittest from samba import registry import samba.tests -class HelperTests(unittest.TestCase): +class HelperTests(samba.tests.TestCase): + def test_predef_to_name(self): self.assertEquals("HKEY_LOCAL_MACHINE", registry.get_predef_name(0x80000002)) @@ -33,6 +33,7 @@ class HelperTests(unittest.TestCase): class HiveTests(samba.tests.TestCaseInTempDir): + def setUp(self): super(HiveTests, self).setUp() self.hive_path = os.path.join(self.tempdir, "ldb_new.ldb") @@ -41,6 +42,7 @@ class HiveTests(samba.tests.TestCaseInTempDir): def tearDown(self): del self.hive os.unlink(self.hive_path) + super(HiveTests, self).tearDown() def test_ldb_new(self): self.assertTrue(self.hive is not None) @@ -52,6 +54,7 @@ class HiveTests(samba.tests.TestCaseInTempDir): # self.hive.del_value("FOO") -class RegistryTests(unittest.TestCase): +class RegistryTests(samba.tests.TestCase): + def test_new(self): self.registry = registry.Registry() |