[attributs_tests] Tests sur les caractères spéciaux
This commit is contained in:
parent
9b79664264
commit
17fae2b1a2
1 changed files with 3 additions and 1 deletions
|
@ -50,6 +50,7 @@ class nomTest(LDAPTest):
|
||||||
attrify_light(u"Space Man", "nom")
|
attrify_light(u"Space Man", "nom")
|
||||||
self.assertRaises(Exception, attrify_light, "Stringman", "nom")
|
self.assertRaises(Exception, attrify_light, "Stringman", "nom")
|
||||||
self.assertRaises(Exception, attrify_light, u" Spaceman", "nom")
|
self.assertRaises(Exception, attrify_light, u" Spaceman", "nom")
|
||||||
|
self.assertRaises(Exception, attrify_light, u"Spéciaux!?", "nom")
|
||||||
|
|
||||||
class prenomTest(LDAPTest):
|
class prenomTest(LDAPTest):
|
||||||
"""Tests sur l'attribut prenom"""
|
"""Tests sur l'attribut prenom"""
|
||||||
|
@ -62,6 +63,7 @@ class prenomTest(LDAPTest):
|
||||||
attrify_light(u"Charles Jean", "prenom")
|
attrify_light(u"Charles Jean", "prenom")
|
||||||
self.assertRaises(Exception, attrify_light, "String", "prenom")
|
self.assertRaises(Exception, attrify_light, "String", "prenom")
|
||||||
self.assertRaises(Exception, attrify_light, u" Space", "prenom")
|
self.assertRaises(Exception, attrify_light, u" Space", "prenom")
|
||||||
|
self.assertRaises(Exception, attrify_light, u"Spéciaux!?", "prenom")
|
||||||
|
|
||||||
class telTest(LDAPTest):
|
class telTest(LDAPTest):
|
||||||
"""Tests sur l'attribut tel"""
|
"""Tests sur l'attribut tel"""
|
||||||
|
@ -73,7 +75,7 @@ class telTest(LDAPTest):
|
||||||
attrify_light(u"00 33 1 23 45 67 89", "tel")
|
attrify_light(u"00 33 1 23 45 67 89", "tel")
|
||||||
attrify_light(u"+42 (0) 1 23456789", "tel")
|
attrify_light(u"+42 (0) 1 23456789", "tel")
|
||||||
self.assertRaises(Exception, attrify_light, "", "tel")
|
self.assertRaises(Exception, attrify_light, "", "tel")
|
||||||
self.assertRaises(Exception, attrify_light, u"caracteres?!", "nom")
|
self.assertRaises(Exception, attrify_light, u"caracteres?!", "tel")
|
||||||
|
|
||||||
def normalizeTel(self):
|
def normalizeTel(self):
|
||||||
"""Normalise correctement les numéros de téléphone"""
|
"""Normalise correctement les numéros de téléphone"""
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue