1
0
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:
Jelmer Vernooij 2014-12-15 17:35:24 +00:00 committed by Andrew Bartlett
parent bd13405e85
commit 85c1dc9908
2 changed files with 7 additions and 3 deletions

View File

@ -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."""

View File

@ -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",