Beispiel #1
0
def test_create_picture_upload_handler_with_missing_last_name():
    u = User(first_name='Ime', business_email='*****@*****.**')
    handler = create_picture_upload_handler('pictures')
    assert handler(u, 'me.jpg') == 'pictures/Ime_me.jpg'
Beispiel #2
0
def test_create_picture_upload_handler_with_missing_names():
    u = User(business_email='*****@*****.**')
    handler = create_picture_upload_handler('pictures')
    assert handler(u, 'me.jpg') == 'pictures/[email protected]_me.jpg'
Beispiel #3
0
def test_create_picture_upload_handler_with_both_names():
    u = User(first_name='Ime', last_name='Priimek',
             business_email='*****@*****.**')
    handler = create_picture_upload_handler('pictures')
    assert handler(u, 'me.jpg') == 'pictures/Priimek_Ime_me.jpg'