mirror of
https://github.com/samba-team/samba.git
synced 2025-08-04 08:22:08 +03:00
python.sites tests: remove excessive transaction management
These are atomic anyway. Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Garming Sam <garming@catalyst.net.nz>
This commit is contained in:
committed by
Andrew Bartlett
parent
bdb03c5229
commit
dbcb13cb05
@ -82,20 +82,16 @@ class SimpleSitesTests(SitesBaseTests):
|
||||
def test_create_and_delete(self):
|
||||
"""test creation and deletion of 1 site"""
|
||||
|
||||
self.ldb.transaction_start()
|
||||
sites.create_site(self.ldb, self.ldb.get_config_basedn(),
|
||||
"testsamba")
|
||||
self.ldb.transaction_commit()
|
||||
|
||||
self.assertRaises(sites.SiteAlreadyExistsException,
|
||||
sites.create_site, self.ldb,
|
||||
self.ldb.get_config_basedn(),
|
||||
"testsamba")
|
||||
|
||||
self.ldb.transaction_start()
|
||||
sites.delete_site(self.ldb, self.ldb.get_config_basedn(),
|
||||
"testsamba")
|
||||
self.ldb.transaction_commit()
|
||||
|
||||
self.assertRaises(sites.SiteNotFoundException,
|
||||
sites.delete_site, self.ldb,
|
||||
|
Reference in New Issue
Block a user