diff options
author | Jelmer Vernooij <jelmer@samba.org> | 2007-12-17 23:16:12 +0100 |
---|---|---|
committer | Stefan Metzmacher <metze@samba.org> | 2007-12-21 05:51:23 +0100 |
commit | 57b8a8fd42f5d89f439fd9d0781bd8f561a84131 (patch) | |
tree | 618faeb3402cfd7c7d01e03f12f1ebdb1f4df1c5 /source4/param/tests/bindings.py | |
parent | c619f86efc4f502f7127a1fd2ac165dd970658f9 (diff) | |
download | samba-57b8a8fd42f5d89f439fd9d0781bd8f561a84131.tar.gz samba-57b8a8fd42f5d89f439fd9d0781bd8f561a84131.tar.bz2 samba-57b8a8fd42f5d89f439fd9d0781bd8f561a84131.zip |
r26517: Add functions for setting and getting parameters on a LoadParm.
Pass loadparm context along to Ldb contexts.
Other minor Python improvements.
(This used to be commit 7a15b486bae8fb774058b2d94cc12b7b01ee6ac0)
Diffstat (limited to 'source4/param/tests/bindings.py')
-rw-r--r-- | source4/param/tests/bindings.py | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/source4/param/tests/bindings.py b/source4/param/tests/bindings.py index 0bdd28a619..9ea1c00daf 100644 --- a/source4/param/tests/bindings.py +++ b/source4/param/tests/bindings.py @@ -29,6 +29,23 @@ class LoadParmTestCase(unittest.TestCase): file = param.LoadParm() self.assertEquals(0, len(file)) + def test_set_workgroup(self): + file = param.LoadParm() + file.set("workgroup", "bla") + self.assertEquals("BLA", file.get("workgroup")) + + def test_is_mydomain(self): + file = param.LoadParm() + file.set("workgroup", "bla") + self.assertTrue(file.is_mydomain("BLA")) + self.assertFalse(file.is_mydomain("FOOBAR")) + + def test_is_myname(self): + file = param.LoadParm() + file.set("netbios name", "bla") + self.assertTrue(file.is_myname("BLA")) + self.assertFalse(file.is_myname("FOOBAR")) + class ParamTestCase(unittest.TestCase): def test_init(self): |