Пример #1
0
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),
    )
Пример #2
0
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,
        ),
    ]
Пример #3
0
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,
        ),
    ]