Exemplo n.º 1
0
def test_is_not_valid():
    photo = Photo(helper.get_file('text.txt'))

    assert not photo.is_valid()
Exemplo n.º 2
0
def test_is_valid():
    photo = Photo(helper.get_file('plain.jpg'))

    assert photo.is_valid()
Exemplo n.º 3
0
def test_pillow_not_loaded():
    photo = Photo(helper.get_file('imghdr-error.jpg'))
    photo.pillow = None

    assert photo.is_valid() == False
Exemplo n.º 4
0
def test_is_valid():
    photo = Photo(helper.get_file('with-location.jpg'))

    assert photo.is_valid()
Exemplo n.º 5
0
def test_is_valid_fallback_using_pillow():
    photo = Photo(helper.get_file('imghdr-error.jpg'))

    assert photo.is_valid()