[test] docstring
This commit is contained in:
parent
90ec85b1a2
commit
d1c026166d
1 changed files with 7 additions and 1 deletions
8
test.py
8
test.py
|
@ -43,6 +43,8 @@ facture_ldif = {}
|
|||
|
||||
|
||||
def keys_of_list_of_dict(l, type=''):
|
||||
"""Récupère la liste de tous les attributs existant.
|
||||
Teste l'écriture des objets si on est en mode rw"""
|
||||
keys = set()
|
||||
if l:
|
||||
anime=anim("Test des objets %r" % type, len(l))
|
||||
|
@ -60,12 +62,15 @@ def keys_of_list_of_dict(l, type=''):
|
|||
else: print "\t%r" % error
|
||||
ok = False
|
||||
anime.cycle()
|
||||
if l: print OK if ok else ERREUR
|
||||
if l:
|
||||
anime.reinit()
|
||||
print OK if ok else ERREUR
|
||||
keys = list(keys)
|
||||
keys.sort()
|
||||
return keys
|
||||
|
||||
def test_list_of_dict(keys, list):
|
||||
"""Test l'instanciation des attributs"""
|
||||
for key in keys:
|
||||
anim("\tTest de l'attribut %s" % key)
|
||||
ok = True
|
||||
|
@ -84,6 +89,7 @@ def test_list_of_dict(keys, list):
|
|||
if ok: print OK
|
||||
|
||||
def tests_machines(parent_dn, realm_list, ipsec=False):
|
||||
"""Test la création et la suppression de machines dans la realm_list"""
|
||||
for realm in realm_list:
|
||||
anim("Creation de machines %s" % realm)
|
||||
try:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue