diff options
author | Jelmer Vernooij <jelmer@samba.org> | 2007-12-17 11:12:36 +0100 |
---|---|---|
committer | Stefan Metzmacher <metze@samba.org> | 2007-12-21 05:51:06 +0100 |
commit | 32f439bfa458f7936b507cb5a1e3c74bcb8c68bf (patch) | |
tree | 417c255fcd68bfc164e0916772060000fa19309a /source4/param/tests | |
parent | e956111917a432d5ea1a7c5cc2fef6c0c3dcbcc1 (diff) | |
download | samba-32f439bfa458f7936b507cb5a1e3c74bcb8c68bf.tar.gz samba-32f439bfa458f7936b507cb5a1e3c74bcb8c68bf.tar.bz2 samba-32f439bfa458f7936b507cb5a1e3c74bcb8c68bf.zip |
r26503: Change order of arguments in param interface so it's easier to make the
section name optional. Fix several smaller bits and pieces in the Python code.
(This used to be commit 1b89311e5fa4fcde060df50e580dc221205cc8ca)
Diffstat (limited to 'source4/param/tests')
-rw-r--r-- | source4/param/tests/bindings.py | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/source4/param/tests/bindings.py b/source4/param/tests/bindings.py index 57ad23b21e..11f8a299be 100644 --- a/source4/param/tests/bindings.py +++ b/source4/param/tests/bindings.py @@ -35,6 +35,17 @@ class ParamTestCase(unittest.TestCase): file = param.ParamFile() self.assertTrue(file is not None) + def test_add_section(self): + file = param.ParamFile() + file.add_section("global") + self.assertTrue(file["global"] is not None) + + def test_set_param_string(self): + file = param.ParamFile() + file.add_section("global") + file["global"]["data"] = "bar" + self.assertEquals("bar", file["global"]["data"]) + def test_get_section(self): file = param.ParamFile() self.assertEquals(None, file.get_section("unknown")) |