mirror of
https://salsa.debian.org/freeipa-team/freeipa.git
synced 2025-02-25 18:55:28 -06:00
Change Password param so (password, confirm_password) can be passed to _convert_scalar()
This commit is contained in:
@@ -1065,6 +1065,17 @@ class test_Password(ClassChecker):
|
||||
assert o.pattern is None
|
||||
assert o.password is True
|
||||
|
||||
def test_convert_scalar(self):
|
||||
"""
|
||||
Test the `ipalib.parameters.Password._convert_scalar` method.
|
||||
"""
|
||||
o = self.cls('my_password')
|
||||
e = raises(errors.PasswordMismatch, o._convert_scalar, [u'one', u'two'])
|
||||
assert e.name == 'my_password'
|
||||
assert e.index is None
|
||||
assert o._convert_scalar([u'one', u'one']) == u'one'
|
||||
assert o._convert_scalar(u'one') == u'one'
|
||||
|
||||
|
||||
class test_StrEnum(ClassChecker):
|
||||
"""
|
||||
|
Reference in New Issue
Block a user