Ignore:
Timestamp:
9 Nov 2015, 10:56:53 (9 years ago)
Author:
Henrik Bettermann
Message:

Customize getAccommodationDetails.

File:
1 edited

Legend:

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

    r13406 r13416  
    2525from mechanize import LinkNotFoundError
    2626from hurry.workflow.interfaces import IWorkflowState
     27from zope.event import notify
    2728from zope.component.hooks import setSite, clearSite
    2829from zope.component import getUtility, createObject, queryUtility
     
    549550    def test_student_accommodation(self):
    550551        del self.student['accommodation']['2004']
     552        # All beds can be assigned
     553        bed1 = self.app['hostels']['hall-1']['hall-1_A_101_A']
     554        bed1.bed_type = u'regular_male_all'
     555        bed2 = self.app['hostels']['hall-1']['hall-1_A_101_B']
     556        bed2.bed_type = u'regular_female_all'
     557        notify(grok.ObjectModifiedEvent(bed1))
     558        notify(grok.ObjectModifiedEvent(bed2))
    551559        # Login
    552560        self.browser.open(self.login_path)
     
    563571        # one bed for this student, we know that
    564572        self.assertEqual(self.student['accommodation']['2004'].bed_coordinates,
    565             'Hall 1, Block A, Room 101, Bed A (regular_male_fr)')
     573            'Hall 1, Block A, Room 101, Bed A (regular_male_all)')
    566574        # Only the hall name is displayed
    567575        self.assertEqual(self.student['accommodation']['2004'].display_coordinates,
Note: See TracChangeset for help on using the changeset viewer.