Ignore:
Timestamp:
14 Oct 2015, 13:15:03 (9 years ago)
Author:
Henrik Bettermann
Message:

Log bed release already in releaseExpiredAllocations method.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • main/waeup.kofa/trunk/src/waeup/kofa/hostels/tests.py

    r13316 r13318  
    192192        self.assertEqual(len(results), 1)
    193193        released = self.app['hostels'].releaseExpiredAllocations(7)
    194         self.assertEqual(released, 0)
     194        self.assertEqual(released, [])
    195195        delta = timedelta(days=10)
    196196        bedticket.booking_date = datetime.utcnow() - delta
    197197        released = self.app['hostels'].releaseExpiredAllocations(7)
    198         self.assertEqual(released, 1)
     198        self.assertEqual(len(released), 1)
     199        self.assertEqual(released, ['hall_block_room_bed (K1000000)'])
    199200        results = cat.searchResults(owner=(self.student_id, self.student_id))
    200201        self.assertEqual(len(results), 0)
     
    204205            self.app['hostels']['hall-x']['hall_block_room_bed'].owner,
    205206            NOT_OCCUPIED)
     207        # Releasing is logged.
     208        logcontent = open(self.logfile).read()
     209        self.assertTrue(
     210            'hostels.container.HostelsContainer - hostels - '
     211            'released: hall_block_room_bed (K1000000)'
     212            in logcontent)
    206213        return
    207214
Note: See TracChangeset for help on using the changeset viewer.