Skip to content

Commit 09ec9c5

Browse files
author
stroeder
committed
removed pseudo test script from module ldap.cidict and added sub-module for testing class ldap.cidict.cidict
1 parent e2bdb37 commit 09ec9c5

4 files changed

Lines changed: 13 additions & 28 deletions

File tree

CHANGES

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,10 @@ Changes since 2.4.41:
66
Lib/
77
* added new SlapdObject methods _ln_schema_files() and
88
_create_sub_dirs()
9+
* removed pseudo test script from module ldap.cidict
10+
11+
Tests/
12+
* added sub-module for testing class ldap.cidict.cidict
913

1014
----------------------------------------------------------------
1115
Released 2.4.41 2017-07-12
@@ -1469,4 +1473,4 @@ Released 2.0.0pre02 2002-02-01
14691473
----------------------------------------------------------------
14701474
Released 1.10alpha3 2000-09-19
14711475

1472-
$Id: CHANGES,v 1.454 2017/08/03 17:26:59 stroeder Exp $
1476+
$Id: CHANGES,v 1.455 2017/08/15 16:14:04 stroeder Exp $

Lib/ldap/cidict.py

Lines changed: 3 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,12 @@
33
returned from LDAP servers containing attribute
44
names of variable case.
55
6-
See http://www.python-ldap.org/ for details.
6+
See https://www.python-ldap.org/ for details.
77
8-
$Id: cidict.py,v 1.13 2009/04/17 14:34:34 stroeder Exp $
8+
$Id: cidict.py,v 1.14 2017/08/15 16:14:04 stroeder Exp $
99
"""
1010

11-
__version__ = """$Revision: 1.13 $"""
11+
__version__ = """$Revision: 1.14 $"""
1212

1313
from UserDict import UserDict
1414
from string import lower
@@ -103,23 +103,3 @@ def strlist_union(a,b):
103103
for elt in b:
104104
temp[elt] = elt
105105
return temp.values()
106-
107-
108-
if __debug__ and __name__ == '__main__':
109-
x = { 'AbCDeF' : 123 }
110-
cix = cidict(x)
111-
assert cix["ABCDEF"] == 123
112-
assert cix.get("ABCDEF",None) == 123
113-
assert cix.get("not existent",None) is None
114-
cix["xYZ"] = 987
115-
assert cix["XyZ"] == 987
116-
assert cix.get("XyZ",None) == 987
117-
cix_keys = cix.keys()
118-
cix_keys.sort()
119-
assert cix_keys==['AbCDeF','xYZ'],ValueError(repr(cix_keys))
120-
cix_items = cix.items()
121-
cix_items.sort()
122-
assert cix_items==[('AbCDeF',123),('xYZ',987)],ValueError(repr(cix_items))
123-
del cix["abcdEF"]
124-
assert not cix._keys.has_key("abcdef")
125-
assert not cix.has_key("AbCDef")

Tests/__init__.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,13 @@
22
"""
33
Automatic tests for python-ldap
44
5-
See http://www.python-ldap.org/ for details.
5+
See https://www.python-ldap.org/ for details.
66
7-
$Id: __init__.py,v 1.5 2017/04/28 07:30:59 stroeder Exp $
7+
$Id: __init__.py,v 1.6 2017/08/15 16:17:29 stroeder Exp $
88
"""
99

1010
import t_cext
11+
import t_cidict
1112
import t_ldap_dn
1213
import t_ldap_filter
1314
import t_ldap_functions

Tests/t_cidict.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@
22
"""
33
Automatic tests for python-ldap's module ldap.cidict
44
5-
See http://www.python-ldap.org/ for details.
5+
See https://www.python-ldap.org/ for details.
66
7-
$Id: t_cidict.py,v 1.1 2017/08/15 15:18:35 stroeder Exp $
7+
$Id: t_cidict.py,v 1.2 2017/08/15 16:14:04 stroeder Exp $
88
"""
99

1010
# from Python's standard lib

0 commit comments

Comments
 (0)