def testShouldHandleBreakfastRequest(self):
     name = 'BREAKFAST'
     patientManager = PatientManager({name: Queue()}, {}, {})
     patientManager.breakfast_lock[1] = ['LAB', 'XRAY', name]
     patientManager.breakfast[1] = 5
     patientManager.tempStationTreshold[name] = 5
     assert patientManager.tempStationTreshold[name] == 5
     assert patientManager.breakfast == {1: 5}
     assert patientManager.breakfast_lock == {1: ['LAB', 'XRAY', name]}
     patientManager.handleBreakfastRequest(name, 15)
     assert (True if name not in patientManager.tempStationTreshold else False) == True
     assert patientManager.breakfast == {}
     assert patientManager.breakfast_lock == {}
 def testShouldHandleBreakfastRequestForMultiplepatients(self):
     name = 'BREAKFAST'
     patientManager = PatientManager({name: Queue()}, {}, {})
     patientManager.breakfast_lock[1] = ['LAB', 'XRAY', name]
     patientManager.breakfast[1] = 5
     patientManager.breakfast_lock[2] = ['LAB', 'ECG', name]
     patientManager.breakfast[2] = 10
     patientManager.breakfast_lock[3] = ['ECG', 'XRAY', name]
     patientManager.breakfast[3] = 5
     patientManager.tempStationTreshold[name] = 5
     assert patientManager.tempStationTreshold[name] == 5
     assert patientManager.breakfast == {1: 5, 2: 10, 3: 5}
     assert patientManager.breakfast_lock == {1: ['LAB', 'XRAY', name], 2: ['LAB', 'ECG', name],
                                              3: ['ECG', 'XRAY', name]}
     patientManager.handleBreakfastRequest(name, 15)
     assert patientManager.tempStationTreshold[name] == 5
     assert patientManager.breakfast == {2: 5}
     assert patientManager.breakfast_lock == {2: ['LAB', 'ECG', name]}
     assert patientManager.patientList == {1: ['LAB', 'XRAY'], 3: ['ECG', 'XRAY']}