From: Jennifer Sutton Date: Tue, 29 Jul 2025 03:02:32 +0000 (+1200) Subject: s4:dsdb:tests: Correct unprefixed f‐string X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=0615268a1c0149d5acee9138873c1ed641637e0d;p=thirdparty%2Fsamba.git s4:dsdb:tests: Correct unprefixed f‐string Signed-off-by: Jennifer Sutton Reviewed-by: Douglas Bagnall --- diff --git a/selftest/knownfail.d/modify_spn_matching_original_dns_host_name b/selftest/knownfail.d/modify_spn_matching_original_dns_host_name new file mode 100644 index 00000000000..2f90b37479b --- /dev/null +++ b/selftest/knownfail.d/modify_spn_matching_original_dns_host_name @@ -0,0 +1 @@ +^samba4\.ldap\.acl\.python\(.*\)\.__main__\.AclModifyTests\.test_modify_spn_matching_dns_host_name_original\(.*\)$ diff --git a/source4/dsdb/tests/python/acl.py b/source4/dsdb/tests/python/acl.py index 5cbf8ef2e70..d07f41370da 100755 --- a/source4/dsdb/tests/python/acl.py +++ b/source4/dsdb/tests/python/acl.py @@ -3667,7 +3667,7 @@ Member: CN=test_modify_user2,CN=Users,""" + self.base_dn self.sd_utils.dacl_add_ace(ou_dn, mod) original_host_name = 'invalid_host_name' - original_spn = 'host/{original_host_name}' + original_spn = f'host/{original_host_name}' # Create the account. self.ldb_admin.add({ @@ -3688,10 +3688,7 @@ Member: CN=test_modify_user2,CN=Users,""" + self.base_dn 'dNSHostName') try: self.ldb_user.modify(m) - except LdbError as err: - num, estr = err.args - self.assertEqual(ERR_CONSTRAINT_VIOLATION, num) - else: + except LdbError: self.fail() def test_modify_dns_host_name_spn_matching_account_name_original(self):