mirror of
https://github.com/samba-team/samba.git
synced 2025-12-17 04:23:50 +03:00
lib/smbconf: add set_parameter method to SMBConf
Add a set_parameter method wrapping smbconf_set_parameter. Signed-off-by: John Mulligan <jmulligan@redhat.com> Reviewed-by: Jeremy Allison <jra@samba.org> Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
This commit is contained in:
committed by
Jeremy Allison
parent
ff603de514
commit
565d8ae8cd
@@ -148,6 +148,18 @@ class SMBConfTests(samba.tests.TestCase):
|
||||
names = sconf.share_names()
|
||||
self.assertEqual(names, [])
|
||||
|
||||
def test_set_parameter(self):
|
||||
sconf = self.s3smbconf.init_reg(None)
|
||||
sconf.drop()
|
||||
sconf.create_share("foobar")
|
||||
sconf.set_parameter("foobar", "path", "/mnt/foobar")
|
||||
sconf.set_parameter("foobar", "browseable", "no")
|
||||
|
||||
s1 = sconf.get_share("foobar")
|
||||
self.assertEqual(
|
||||
s1, ("foobar", [("path", "/mnt/foobar"), ("browseable", "no")])
|
||||
)
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
import unittest
|
||||
|
||||
Reference in New Issue
Block a user