1
0
mirror of https://github.com/samba-team/samba.git synced 2025-12-12 12:23:50 +03:00

lib/smbconf: add drop method to SMBConf

Add a drop method wrapping smbconf_drop.

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:
John Mulligan
2022-04-24 08:17:53 -04:00
committed by Jeremy Allison
parent eb84f67e80
commit ff603de514
2 changed files with 28 additions and 0 deletions

View File

@@ -131,6 +131,7 @@ class SMBConfTests(samba.tests.TestCase):
def test_create_share(self):
sconf = self.s3smbconf.init_reg(None)
sconf.drop()
sconf.create_share("alice")
sconf.create_share("bob")
names = sconf.share_names()
@@ -139,6 +140,14 @@ class SMBConfTests(samba.tests.TestCase):
self.smbconf.SMBConfError, sconf.create_share, "alice"
)
def test_create_share(self):
sconf = self.s3smbconf.init_reg(None)
sconf.drop()
sconf.create_share("alice")
sconf.drop()
names = sconf.share_names()
self.assertEqual(names, [])
if __name__ == "__main__":
import unittest