mirror of
https://github.com/samba-team/samba.git
synced 2025-01-26 10:04:02 +03:00
Fix use of TestCase.skipTest on python2.6 now that we no longer use testtools.
Change-Id: I630e4073bf1553dfc77e9fe7e843ee8b71907683 Signed-off-by: Jelmer Vernooij <jelmer@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
This commit is contained in:
parent
bd13405e85
commit
85c1dc9908
@ -53,6 +53,10 @@ class TestCase(unittest.TestCase):
|
||||
def get_credentials(self):
|
||||
return cmdline_credentials
|
||||
|
||||
if not getattr(unittest.TestCase, "skipTest", None):
|
||||
def skipTest(self, reason):
|
||||
raise SkipTest(reason)
|
||||
|
||||
|
||||
class LdbTestCase(unittest.TestCase):
|
||||
"""Trivial test case for running tests against a LDB."""
|
||||
|
@ -45,12 +45,12 @@ class SrvsvcTests(RpcInterfaceTestCase):
|
||||
return share
|
||||
|
||||
def test_NetShareAdd(self):
|
||||
self.skip("Dangerous test")
|
||||
self.skipTest("Dangerous test")
|
||||
share = self.getDummyShareObject()
|
||||
self.conn.NetShareAdd(self.server_unc, 2, share, None)
|
||||
|
||||
def test_NetShareSetInfo(self):
|
||||
self.skip("Dangerous test")
|
||||
self.skipTest("Dangerous test")
|
||||
share = self.getDummyShareObject()
|
||||
parm_error = 0x00000000
|
||||
self.conn.NetShareAdd(self.server_unc, 502, share, parm_error)
|
||||
@ -60,7 +60,7 @@ class SrvsvcTests(RpcInterfaceTestCase):
|
||||
502, share, parm_error)
|
||||
|
||||
def test_NetShareDel(self):
|
||||
self.skip("Dangerous test")
|
||||
self.skipTest("Dangerous test")
|
||||
share = self.getDummyShareObject()
|
||||
parm_error = 0x00000000
|
||||
self.expectFailure("NetShareAdd doesn't work properly from Python",
|
||||
|
Loading…
x
Reference in New Issue
Block a user