mirror of
https://salsa.debian.org/freeipa-team/freeipa.git
synced 2025-02-25 18:55:28 -06:00
Redo boolean value encoding.
Move the code for encoding boolean values to LDAP boolean syntax from the Parameter class to the Encoder class, where the rest of LDAP encoding takes place. Remove encoding code from the Parameter class altogether, as all LDAP encoding should be done in the Encoder class.
This commit is contained in:
committed by
Martin Kosek
parent
abef5e8c02
commit
d9d1967989
@@ -49,7 +49,7 @@ class test_Encoder(ClassChecker):
|
||||
assert_equal(o.encode('ahoj'), 'ahoj'.encode(encode_to))
|
||||
assert_equal(o.encode(_test_str_d), _test_str_e)
|
||||
# bool, float, int, long
|
||||
assert_equal(o.encode(True), str(True).encode(encode_to))
|
||||
assert_equal(o.encode(True), 'TRUE'.encode(encode_to))
|
||||
assert_equal(o.encode(1.01), str(1.01).encode(encode_to))
|
||||
assert_equal(o.encode(1000), str(1000).encode(encode_to))
|
||||
assert_equal(o.encode(long(1)), str(long(1)).encode(encode_to))
|
||||
|
||||
Reference in New Issue
Block a user