summaryrefslogtreecommitdiff
path: root/python
diff options
context:
space:
mode:
authorJoe Guo <joeg@catalyst.net.nz>2018-07-06 10:32:17 +1200
committerAndrew Bartlett <abartlet@samba.org>2018-07-12 04:32:03 +0200
commit1c09fc2de3cb4cb18cba35ea410fb74742cd9065 (patch)
tree25c407f5c05ccab69f6ed558c27d5ffd8658367e /python
parent6875f4354a356ccdf11b8a08aa9e197e51a3c40f (diff)
downloadsamba-1c09fc2de3cb4cb18cba35ea410fb74742cd9065.tar.gz
tests/posixacl: move setUp and tearDown to top
Make it clear to find out what we have in test. BUG: https://bugzilla.samba.org/show_bug.cgi?id=13521 Signed-off-by: Joe Guo <joeg@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Gary Lockyer <gary@catalyst.net.nz>
Diffstat (limited to 'python')
-rw-r--r--python/samba/tests/posixacl.py30
1 files changed, 14 insertions, 16 deletions
diff --git a/python/samba/tests/posixacl.py b/python/samba/tests/posixacl.py
index 5c4cdad9d31..175fcb2c177 100644
--- a/python/samba/tests/posixacl.py
+++ b/python/samba/tests/posixacl.py
@@ -32,6 +32,20 @@ ACL = "O:S-1-5-21-2212615479-2695158682-2101375467-512G:S-1-5-21-2212615479-2695
class PosixAclMappingTests(TestCaseInTempDir):
+ def setUp(self):
+ super(PosixAclMappingTests, self).setUp()
+ s3conf = s3param.get_context()
+ s3conf.load(self.get_loadparm().configfile)
+ s3conf.set("xattr_tdb:file", os.path.join(self.tempdir, "xattr.tdb"))
+ self.lp = s3conf
+ self.tempf = os.path.join(self.tempdir, "test")
+ open(self.tempf, 'w').write("empty")
+
+ def tearDown(self):
+ smbd.unlink(self.tempf)
+ os.unlink(os.path.join(self.tempdir, "xattr.tdb"))
+ super(PosixAclMappingTests, self).tearDown()
+
def print_posix_acl(self, posix_acl):
aclstr = ""
for entry in posix_acl.acl:
@@ -774,19 +788,3 @@ class PosixAclMappingTests(TestCaseInTempDir):
# a_perm: 7
# uid: -1
# gid: -1
-
-#
-
- def setUp(self):
- super(PosixAclMappingTests, self).setUp()
- s3conf = s3param.get_context()
- s3conf.load(self.get_loadparm().configfile)
- s3conf.set("xattr_tdb:file", os.path.join(self.tempdir,"xattr.tdb"))
- self.lp = s3conf
- self.tempf = os.path.join(self.tempdir, "test")
- open(self.tempf, 'w').write("empty")
-
- def tearDown(self):
- smbd.unlink(self.tempf)
- os.unlink(os.path.join(self.tempdir,"xattr.tdb"))
- super(PosixAclMappingTests, self).tearDown()