Ignore:
Timestamp:
27 Sep 2011, 08:00:33 (13 years ago)
Author:
Henrik Bettermann
Message:

Replace student's name attribute by fullname attributes to avoid confusion.

Location:
main/waeup.sirp/trunk/src/waeup/sirp/students/tests
Files:
3 edited

Legend:

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

    r6756 r6818  
    6565class FakeStudent(object):
    6666    student_id = 'test_stud'
    67     name = 'Test User'
     67    fullname = 'Test User'
    6868    password = None
    6969
  • main/waeup.sirp/trunk/src/waeup/sirp/students/tests/test_browser.py

    r6810 r6818  
    6969        setSite(app)
    7070
    71         # Add student with subobjects (done by addStudent)
     71        # Add student with subobjects
    7272        student = Student()
    73         student.name = u'Anna Tester'
     73        student.fullname = u'Anna Tester'
    7474        student.reg_number = u'123'
    7575        student.matric_number = u'234'
     
    186186        self.assertEqual(self.browser.headers['Status'], '200 Ok')
    187187        self.assertEqual(self.browser.url, self.add_student_path)
    188         self.browser.getControl(name="form.name").value = 'Bob Tester'
     188        self.browser.getControl(name="form.fullname").value = 'Bob Tester'
    189189        self.browser.getControl("Create student record").click()
    190190        self.assertTrue('Student record created' in self.browser.contents)
     
    213213        self.browser.getControl("Search").click()
    214214        self.assertTrue('Empty search string' in self.browser.contents)
    215         self.browser.getControl(name="searchtype").value = ['name']
     215        self.browser.getControl(name="searchtype").value = ['fullname']
    216216        self.browser.getControl(name="searchterm").value = 'Anna Tester'
    217217        self.browser.getControl("Search").click()
     
    255255        # Managers can edit base data and fire transitions
    256256        self.browser.getControl(name="transition").value = ['admit']
    257         self.browser.getControl(name="form.name").value = 'John Tester'
     257        self.browser.getControl(name="form.fullname").value = 'John Tester'
    258258        self.browser.getControl(name="form.reg_number").value = '345'
    259259        self.browser.getControl(name="password").value = 'secret'
     
    429429        student = Student()
    430430        student.reg_number = u'123456'
    431         student.name = u'Klaus Tester'
     431        student.fullname = u'Klaus Tester'
    432432        test_student_id = self.app['students'].addStudent(student)
    433433        setpassword_path = 'http://localhost/app/setpassword'
  • main/waeup.sirp/trunk/src/waeup/sirp/students/tests/test_catalog.py

    r6733 r6818  
    4444        # Create students
    4545        student = Student()
    46         student.name = u'Bob Tester'
     46        student.fullname = u'Bob Tester'
    4747        student.student_id = u'A123456'
    4848        self.app['students'][student.student_id] = student
     
    7474        # We can find a certain name
    7575        cat = queryUtility(ICatalog, name='students_catalog')
    76         results = cat.searchResults(name='Bob Tester')
     76        results = cat.searchResults(fullname='Bob Tester')
    7777        results = [x for x in results] # Turn results generator into list
    7878        assert len(results) == 1
Note: See TracChangeset for help on using the changeset viewer.