Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
L
lc_ldap
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Hamza Dely
lc_ldap
Commits
51dcdc48
Commit
51dcdc48
authored
Oct 17, 2010
by
Nicolas Dandrimont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[attributs_tests] paiement et carte etudiant
parent
c4a55f5d
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
26 additions
and
0 deletions
+26
-0
attributs_tests.py
attributs_tests.py
+26
-0
No files found.
attributs_tests.py
View file @
51dcdc48
...
...
@@ -30,6 +30,11 @@
# NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
import
sys
as
_sys
_sys
.
path
.
append
(
'/usr/scripts/gestion'
)
del
_sys
import
config
import
unittest
from
lc_ldap_tests
import
LDAPTest
,
auto_suite
...
...
@@ -84,10 +89,31 @@ class telTest(LDAPTest):
attr
=
self
.
attrify_light
(
u
"+42 (0) 1 23456789"
,
"tel"
)
self
.
assertEqual
(
str
(
attr
),
"0042123456789"
)
class
yearTest
(
LDAPTest
):
"""Tests sur des champs entiers"""
tests
=
[
"acceptInt"
]
field
=
None
def
acceptInt
(
self
):
"""Accepte les entiers prédéfinis"""
self
.
attrify_light
(
u
"1999"
,
self
.
field
)
self
.
attrify_light
(
u
"2008"
,
self
.
field
)
self
.
assertRaises
(
ValueError
,
self
.
attrify_light
,
u
"1990"
,
self
.
field
)
self
.
assertRaises
(
ValueError
,
self
.
attrify_light
,
unicode
(
config
.
ann_scol
+
1
),
self
.
field
)
class
paiementTest
(
yearTest
):
"""Tests sur l'attribut paiement"""
field
=
"paiement"
class
carteEtudiantTest
(
yearTest
):
"""Tests sur l'attribut paiement"""
field
=
"carteEtudiant"
TEST_SUITE
=
unittest
.
TestSuite
((
auto_suite
(
nomTest
),
auto_suite
(
prenomTest
),
auto_suite
(
telTest
),
auto_suite
(
paiementTest
),
auto_suite
(
carteEtudiantTest
),
))
if
__name__
==
"__main__"
:
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment