mirror of
https://github.com/samba-team/samba.git
synced 2025-01-11 05:18:09 +03:00
s4-dsdb: Use a raw python string to avoid creating and invalid escape sequence
While the invalid escape sequence worked and was passed to the LDB layer for it's use, linting tools will complain so we should not do this. We don't want to get caught out when a future python version becomes more strict. Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz> Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
This commit is contained in:
parent
16b7c1f3d8
commit
cc38a61442
@ -87,7 +87,7 @@ class SamTests(samba.tests.TestCase):
|
||||
|
||||
delete_force(self.ldb, "cn=ldaptestuser,cn=users," + self.base_dn)
|
||||
delete_force(self.ldb, "cn=ldaptestuser2,cn=users," + self.base_dn)
|
||||
delete_force(self.ldb, "cn=ldaptest\,specialuser,cn=users," + self.base_dn)
|
||||
delete_force(self.ldb, r"cn=ldaptest\,specialuser,cn=users," + self.base_dn)
|
||||
delete_force(self.ldb, "cn=ldaptestcomputer,cn=computers," + self.base_dn)
|
||||
delete_force(self.ldb, "cn=ldaptestcomputer2,cn=computers," + self.base_dn)
|
||||
delete_force(self.ldb, "cn=ldaptestgroup,cn=users," + self.base_dn)
|
||||
@ -632,9 +632,9 @@ class SamTests(samba.tests.TestCase):
|
||||
|
||||
# Make also a small test for accounts with special DNs ("," in this case)
|
||||
ldb.add({
|
||||
"dn": "cn=ldaptest\,specialuser,cn=users," + self.base_dn,
|
||||
"dn": r"cn=ldaptest\,specialuser,cn=users," + self.base_dn,
|
||||
"objectclass": "user"})
|
||||
delete_force(self.ldb, "cn=ldaptest\,specialuser,cn=users," + self.base_dn)
|
||||
delete_force(self.ldb, r"cn=ldaptest\,specialuser,cn=users," + self.base_dn)
|
||||
|
||||
def test_sam_attributes(self):
|
||||
"""Test the behaviour of special attributes of SAM objects"""
|
||||
|
Loading…
Reference in New Issue
Block a user