1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-22 13:34:15 +03:00

python: get rid of pointless empty overridden methods

Signed-off-by: Rob van der Linde <rob@catalyst.net.nz>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
This commit is contained in:
Rob van der Linde 2023-11-28 15:59:41 +13:00 committed by Andrew Bartlett
parent 983f222e38
commit e8fda61a57
33 changed files with 0 additions and 99 deletions

View File

@ -98,9 +98,6 @@ class AuditLogPassChangeTests(AuditLogTestBase):
self.waitForMessages(1, dn=dn)
self.discardMessages()
def tearDown(self):
super(AuditLogPassChangeTests, self).tearDown()
def test_net_change_password(self):
dn = "CN=" + USER_NAME + ",CN=Users," + self.base_dn

View File

@ -50,9 +50,6 @@ class AuthLogTests(samba.tests.auth_log_base.AuthLogTestBase):
super(AuthLogTests, self).setUp()
self.remoteAddress = os.environ["CLIENT_IP"]
def tearDown(self):
super(AuthLogTests, self).tearDown()
def smb_connection(self, creds, use_spnego="yes", ntlmv2_auth="yes",
force_smb1=False):
# the SMB bindings rely on having a s3 loadparm

View File

@ -35,9 +35,6 @@ class AuthLogTestsNcalrpc(samba.tests.auth_log_base.AuthLogTestBase):
super(AuthLogTestsNcalrpc, self).setUp()
self.remoteAddress = AS_SYSTEM_MAGIC_PATH_TOKEN
def tearDown(self):
super(AuthLogTestsNcalrpc, self).tearDown()
def _test_rpc_ncaclrpc(self, authTypes, binding, creds,
protection, checkFunction):

View File

@ -71,9 +71,6 @@ class AuthLogPassChangeTests(samba.tests.auth_log_base.AuthLogTestBase):
def _authDescription(self):
return "samr_ChangePasswordUser4"
def tearDown(self):
super(AuthLogPassChangeTests, self).tearDown()
def test_admin_change_password(self):
def isLastExpectedMessage(msg):
return ((msg["type"] == "Authentication") and

View File

@ -35,9 +35,6 @@ class BaseWrapper (object):
"""Blackbox tests for JSON output of the net ads suite of commands."""
subcmd = None
def setUp(self):
super(BaseWrapper.NetAdsJSONTests_Base, self).setUp()
def test_json_wellformed (self):
"""The output of ``--json`` commands must parse as JSON."""
argv = "%s %s --json" % (COMMAND, self.subcmd)

View File

@ -20,9 +20,6 @@ from samba.tests import BlackboxProcessError
class BasicSmbCaclsTests(SmbCaclsBlockboxTestBase):
def setUp(self):
super(BasicSmbCaclsTests, self).setUp()
def test_simple_single_set(self):
"""test smbcacls '--set' attempts to overwrite the ACL for the file

View File

@ -82,6 +82,3 @@ class DfsInheritanceSmbCaclsTests(InheritanceSmbCaclsTests):
self.smb_cacls(["--modify", file_acl_str, self.f1])
self.smb_cacls(["--modify", file_acl_str, self.f2])
self.smb_cacls(["--modify", file_acl_str, self.f3])
def tearDown(self):
super(DfsInheritanceSmbCaclsTests, self).tearDown()

View File

@ -26,8 +26,6 @@ from samba.credentials import Credentials, SMB_ENCRYPTION_REQUIRED, SMB_ENCRYPTI
from samba import NTSTATUSError
class RpcBindingTests(RpcInterfaceTestCase):
def setUp(self):
super(RpcBindingTests, self).setUp()
def get_user_creds(self):
c = Credentials()

View File

@ -27,8 +27,6 @@ from samba.credentials import Credentials, SMB_ENCRYPTION_REQUIRED, SMB_ENCRYPTI
from samba.trust_utils import CreateTrustedDomainRelax
class CreateTrustedDomainRelaxTest(TestCase):
def setUp(self):
super(CreateTrustedDomainRelaxTest, self).setUp()
def get_user_creds(self):
c = Credentials()

View File

@ -1772,9 +1772,6 @@ class TestRPCRoundtrip(DNSTest):
self.lp,
self.creds)
def tearDown(self):
super(TestRPCRoundtrip, self).tearDown()
def rpc_update(self, fqn=None, data=None, wType=None, delete=False):
fqn = fqn or ("rpctestrec." + self.get_dns_domain())

View File

@ -46,9 +46,6 @@ class SchemaAttributesTestCase(samba.tests.TestCase):
self.base_dn = res[0]["defaultNamingContext"][0]
self.forest_level = int(res[0]["forestFunctionality"][0])
def tearDown(self):
super(SchemaAttributesTestCase, self).tearDown()
def _ldap_schemaUpdateNow(self):
ldif = """
dn:

View File

@ -24,9 +24,6 @@ import samba.tests
class GlueTests(samba.tests.TestCase):
def setUp(self):
super(GlueTests, self).setUp()
def test_generate_random_str(self):
string = _glue.generate_random_str(10)
self.assertEqual(type(string), str)

View File

@ -5098,9 +5098,6 @@ class GPOTests(tests.TestCase):
self.lp.load_default()
self.creds = self.insta_creds(template=self.get_credentials())
def tearDown(self):
super(GPOTests, self).tearDown()
def test_gpo_list(self):
global poldir, dspath
gpos = get_gpo_list(self.server, self.creds, self.lp,

View File

@ -29,9 +29,6 @@ class GPOTests(tests.TestCase):
self.lp.load_default()
self.creds = self.insta_creds(template=self.get_credentials())
def tearDown(self):
super(GPOTests, self).tearDown()
def test_sec_ext_load_on_member(self):
cache_dir = self.lp.get('cache directory')
store = GPOStorage(os.path.join(cache_dir, 'gpo.tdb'))

View File

@ -48,9 +48,6 @@ creds = credopts.get_credentials(lp)
class LdapReferralTest(samba.tests.TestCase):
def setUp(self):
super(LdapReferralTest, self).setUp()
# The referral entries for an ldap request should have the ldap scheme
# i.e. then should all start with "ldap://"
def test_ldap_search(self):

View File

@ -39,9 +39,6 @@ class NetJoinTests(samba.tests.TestCaseInTempDir):
self.lp.set("lock dir", self.tempdir)
self.lp.set("state directory", self.tempdir)
def tearDown(self):
super(NetJoinTests, self).tearDown()
def test_net_join(self):
netbios_name = "NetJoinTest"
machinepass = "abcdefghij"

View File

@ -39,9 +39,6 @@ class NetJoinNoSpnegoTests(samba.tests.TestCaseInTempDir):
self.lp.set("lock dir", self.tempdir)
self.lp.set("state directory", self.tempdir)
def tearDown(self):
super(NetJoinNoSpnegoTests, self).tearDown()
def test_net_join_no_spnego(self):
self.lp.set("client ipc max protocol", "NT1")
self.lp.set("client use spnego", "no")

View File

@ -27,9 +27,6 @@ class NetBiosTests(samba.tests.TestCase):
self.ifc = os.environ["SERVER_IP"]
self.dc = os.environ["DC_NETBIOSNAME"]
def tearDown(self):
super(NetBiosTests, self).tearDown()
def test_query_name(self):
(reply_from, names, addresses) = self.n.query_name(self.dc, self.ifc, timeout=4)
assert reply_from == self.ifc

View File

@ -47,9 +47,6 @@ class NetlogonServiceTests(TestCase):
self.creds.guess(self.lp)
def tearDown(self):
super(NetlogonServiceTests, self).tearDown()
def test_have_netlogon_connection(self):
try:
c = self.get_netlogon_connection()

View File

@ -46,9 +46,6 @@ class NtlmDisabledTests(TestCase):
self.creds.set_password(os.getenv("PASSWORD"))
self.creds.set_kerberos_state(DONT_USE_KERBEROS)
def tearDown(self):
super(NtlmDisabledTests, self).tearDown()
def test_ntlm_connection(self):
try:
conn = srvsvc.srvsvc("ncacn_np:%s[smb2,ntlm]" % self.server, self.lp, self.creds)

View File

@ -38,9 +38,6 @@ import binascii
class PassWordHashFl2003Tests(PassWordHashTests):
def setUp(self):
super(PassWordHashFl2003Tests, self).setUp()
def test_default_supplementalCredentials(self):
self.add_user(options=[("password hash userPassword schemes", "")])

View File

@ -37,9 +37,6 @@ import binascii
class PassWordHashFl2008Tests(PassWordHashTests):
def setUp(self):
super(PassWordHashFl2008Tests, self).setUp()
def test_default_supplementalCredentials(self):
self.add_user()

View File

@ -40,9 +40,6 @@ import samba
class PassWordHashGpgmeTests(PassWordHashTests):
def setUp(self):
super(PassWordHashGpgmeTests, self).setUp()
def test_default_supplementalCredentials(self):
self.add_user()
if not self.lp.get("password hash gpg key ids"):

View File

@ -55,9 +55,6 @@ def attid_equal(a1, a2):
class PassWordHashLDAPTests(PassWordHashTests):
def setUp(self):
super(PassWordHashLDAPTests, self).setUp()
# Get the supplemental credentials for the user under test
def get_supplemental_creds_drs(self):
binding_str = "ncacn_ip_tcp:%s[seal]" % os.environ["SERVER"]

View File

@ -49,9 +49,6 @@ class PreforkProcessRestartTests(TestCase):
lp_ctx = self.get_loadparm()
self.msg_ctx = Messaging(lp_ctx=lp_ctx)
def tearDown(self):
super(PreforkProcessRestartTests, self).tearDown()
def get_process_data(self):
services = self.msg_ctx.irpc_all_servers()

View File

@ -30,12 +30,6 @@ from ldb import LdbError, ERR_OPERATIONS_ERROR
class StandardModelProcessLimitTests(TestCase):
def setUp(self):
super(StandardModelProcessLimitTests, self).setUp()
def tearDown(self):
super(StandardModelProcessLimitTests, self).tearDown()
def simple_bind(self):
creds = self.insta_creds(template=self.get_credentials())
creds.set_bind_dn("%s\\%s" % (creds.get_domain(),

View File

@ -45,9 +45,6 @@ class NetS3JoinTests(samba.tests.TestCaseInTempDir):
self.server = os.environ["SERVER"]
self.lp = self.get_loadparm()
def tearDown(self):
super(NetS3JoinTests, self).tearDown()
def test_net_join(self):
netbios_name = "S3NetJoinTest"
machinepass = "abcdefghij"

View File

@ -29,9 +29,6 @@ class SchemaCmdTestCase(SambaToolCmdTest):
self.samdb = self.getSamDB("-H", "ldap://%s" % os.environ["DC_SERVER"],
"-U%s%%%s" % (os.environ["DC_USERNAME"], os.environ["DC_PASSWORD"]))
def tearDown(self):
super(SchemaCmdTestCase, self).tearDown()
def test_display_attribute(self):
"""Tests that we can display schema attributes"""
(result, out, err) = self.runsublevelcmd("schema", ("attribute",

View File

@ -55,9 +55,6 @@ class UserCmdCryptShaTestCase(SambaToolCmdTest):
users = []
samdb = None
def setUp(self):
super(UserCmdCryptShaTestCase, self).setUp()
def add_user(self, hashes=""):
self.lp = samba.tests.env_loadparm()

View File

@ -55,9 +55,6 @@ class UserCmdCryptShaTestCase(SambaToolCmdTest):
users = []
samdb = None
def setUp(self):
super(UserCmdCryptShaTestCase, self).setUp()
def add_user(self, hashes=""):
self.lp = samba.tests.env_loadparm()

View File

@ -107,8 +107,6 @@ def get_utf8_matrix(s):
class SambaToolVisualizeDrsTest(SambaToolCmdTest):
def setUp(self):
super(SambaToolVisualizeDrsTest, self).setUp()
def test_ntdsconn(self):
server = "ldap://%s" % os.environ["SERVER"]

View File

@ -24,9 +24,6 @@ import errno
class SamDBApiTestCase(TestCaseInTempDir):
def setUp(self):
super(SamDBApiTestCase, self).setUp()
def tearDown(self):
self.rm_files("test.db", "existing.db", allow_missing=True)

View File

@ -23,9 +23,6 @@ import os
class TDBUtilTests(samba.tests.TestCaseInTempDir):
def setUp(self):
super(TDBUtilTests, self).setUp()
def test_tdb_copy(self):
src_ldb_file = os.path.join(self.tempdir, "source.ldb")
dst_ldb_file = os.path.join(self.tempdir, "destination.ldb")