[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=''):
|
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()
|
keys = set()
|
||||||
if l:
|
if l:
|
||||||
anime=anim("Test des objets %r" % type, len(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
|
else: print "\t%r" % error
|
||||||
ok = False
|
ok = False
|
||||||
anime.cycle()
|
anime.cycle()
|
||||||
if l: print OK if ok else ERREUR
|
if l:
|
||||||
|
anime.reinit()
|
||||||
|
print OK if ok else ERREUR
|
||||||
keys = list(keys)
|
keys = list(keys)
|
||||||
keys.sort()
|
keys.sort()
|
||||||
return keys
|
return keys
|
||||||
|
|
||||||
def test_list_of_dict(keys, list):
|
def test_list_of_dict(keys, list):
|
||||||
|
"""Test l'instanciation des attributs"""
|
||||||
for key in keys:
|
for key in keys:
|
||||||
anim("\tTest de l'attribut %s" % key)
|
anim("\tTest de l'attribut %s" % key)
|
||||||
ok = True
|
ok = True
|
||||||
|
@ -84,6 +89,7 @@ def test_list_of_dict(keys, list):
|
||||||
if ok: print OK
|
if ok: print OK
|
||||||
|
|
||||||
def tests_machines(parent_dn, realm_list, ipsec=False):
|
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:
|
for realm in realm_list:
|
||||||
anim("Creation de machines %s" % realm)
|
anim("Creation de machines %s" % realm)
|
||||||
try:
|
try:
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue