Ignore:
Timestamp:
13 Sep 2011, 16:21:44 (13 years ago)
Author:
Henrik Bettermann
Message:

Add matriculation number to student's base data.

Registration and matriculation numbers must be unique. Use UniqueField? indexes in catalog for both.

Test fails, I don't know why.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • main/waeup.sirp/trunk/src/waeup/sirp/students/tests/test_browser.py

    r6714 r6750  
    3434from hurry.workflow.interfaces import IWorkflowInfo
    3535from waeup.sirp.testing import (
    36     FunctionalLayer, FunctionalTestCase, remove_logger,
    37     remove_new_loggers,
    38     )
     36    FunctionalLayer, FunctionalTestCase, remove_new_loggers,
     37   )
    3938from waeup.sirp.app import University
    4039from waeup.sirp.students.container import StudentsContainer
     
    7877        student = Student()
    7978        student.name = u'Anna Tester'
     79        student.reg_number = u'123'
     80        student.matric_number = u'234'
    8081        self.test_student_id = self.app['students'].addStudent(student)
    8182        # Set password
     
    164165        self.browser.getControl("Create student record").click()
    165166        self.assertTrue('Student record created' in self.browser.contents)
     167
     168        # Registration numbers must be unique
     169        self.browser.getLink("Manage").click()
     170        self.browser.getControl(name="form.reg_number").value = '123'
     171        self.browser.getControl("Save").click()
     172        self.assertMatches('...value already exists in catalog...',
     173                           self.browser.contents)
    166174
    167175        self.browser.open(self.container_path)
Note: See TracChangeset for help on using the changeset viewer.