[attributs_tests] Tests sur les caractères spéciaux

This commit is contained in:
Nicolas Dandrimont 2010-10-16 17:53:32 +02:00
parent 9b79664264
commit 17fae2b1a2

View file

@ -50,6 +50,7 @@ class nomTest(LDAPTest):
attrify_light(u"Space Man", "nom")
self.assertRaises(Exception, attrify_light, "Stringman", "nom")
self.assertRaises(Exception, attrify_light, u" Spaceman", "nom")
self.assertRaises(Exception, attrify_light, u"Spéciaux!?", "nom")
class prenomTest(LDAPTest):
"""Tests sur l'attribut prenom"""
@ -62,6 +63,7 @@ class prenomTest(LDAPTest):
attrify_light(u"Charles Jean", "prenom")
self.assertRaises(Exception, attrify_light, "String", "prenom")
self.assertRaises(Exception, attrify_light, u" Space", "prenom")
self.assertRaises(Exception, attrify_light, u"Spéciaux!?", "prenom")
class telTest(LDAPTest):
"""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"+42 (0) 1 23456789", "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):
"""Normalise correctement les numéros de téléphone"""