1
0
mirror of https://github.com/samba-team/samba.git synced 2025-08-05 12:22:11 +03:00

python/pso tests: use string .format() style rather than C-style %s/%d.

Signed-off-by: Tim Beale <timbeale@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
This commit is contained in:
Tim Beale
2018-08-15 17:21:43 +12:00
committed by Andrew Bartlett
parent 9b86c5f8bc
commit 078bd79501

View File

@ -226,21 +226,21 @@ class PasswordSettings:
# all the following fields are mandatory for the PSO object
ldif = """
dn: %s
dn: {}
objectClass: msDS-PasswordSettings
msDS-PasswordSettingsPrecedence: %u
msDS-PasswordReversibleEncryptionEnabled: %s
msDS-PasswordHistoryLength: %u
msDS-PasswordComplexityEnabled: %s
msDS-MinimumPasswordLength: %u
msDS-MinimumPasswordAge: %d
msDS-MaximumPasswordAge: %d
msDS-LockoutThreshold: %u
msDS-LockoutObservationWindow: %d
msDS-LockoutDuration: %d
""" % (self.dn, self.precedence, plaintext_str, self.history_len,
complexity_str, self.password_len, min_age, max_age,
self.lockout_attempts, lockout_window, lockout_duration)
msDS-PasswordSettingsPrecedence: {}
msDS-PasswordReversibleEncryptionEnabled: {}
msDS-PasswordHistoryLength: {}
msDS-PasswordComplexityEnabled: {}
msDS-MinimumPasswordLength: {}
msDS-MinimumPasswordAge: {}
msDS-MaximumPasswordAge: {}
msDS-LockoutThreshold: {}
msDS-LockoutObservationWindow: {}
msDS-LockoutDuration: {}
""".format(self.dn, self.precedence, plaintext_str, self.history_len,
complexity_str, self.password_len, min_age, max_age,
self.lockout_attempts, lockout_window, lockout_duration)
return ldif