From 32f439bfa458f7936b507cb5a1e3c74bcb8c68bf Mon Sep 17 00:00:00 2001 From: Jelmer Vernooij Date: Mon, 17 Dec 2007 11:12:36 +0100 Subject: 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) --- source4/param/tests/bindings.py | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'source4/param/tests') 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")) -- cgit