def staff_hours(request): return render_to_response( 'staff-hours.html', { 'title': 'Staff Hours', 'staff_hours': get_staff_hours(), 'today': time.strftime('%A'), 'lab_status': get_lab_status(), }, context_instance=RequestContext(request), )
def test_get_staff_hours(mock_disk): assert get_staff_hours() == [ Hour( day='Monday', time='4:10-5:00pm', staff=[ Staffer( user_name='nickimp', real_name='Nick Impicciche', position='General Manager', ), Staffer( user_name='ckuehl', real_name='Chris Kuehl', position='Site Manager', ), Staffer( user_name='lynntsai', real_name='Lynn Tsai', position='Staff Member', ), ], cancelled=False, ), Hour( day='Tuesday', time='3:10pm-4:00pm', staff=[ Staffer( user_name='willh', real_name='William Ho', position='Deputy Manager', ) ], cancelled=True, ), ]