Beispiel #1
0
def test_gravatars(size):
    staffer = Staffer(
        user_name='ckuehl',
        real_name='Chris Kuehl',
        position='Site Manager',
    )
    url = staffer.gravatar(size)
    assert url.startswith('https://www.gravatar.com/avatar/b4a3363de72988194e4b9c25195c3d07?')
    assert ('s=' + str(size)) in url.split('?')[1].split('&')
Beispiel #2
0
def test_gravatars(size):
    staffer = Staffer(
        user_name='ckuehl',
        real_name='Chris Kuehl',
        position='Site Manager',
    )
    url = staffer.gravatar(size)
    assert url.startswith(
        'https://www.gravatar.com/avatar/b4a3363de72988194e4b9c25195c3d07?')
    assert ('s=' + str(size)) in url.split('?')[1].split('&')
Beispiel #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,
        ),
    ]