Example #1
0
def test_is_not_valid():
    photo = Photo(helper.get_file('text.txt'))

    assert not photo.is_valid()
Example #2
0
def test_is_valid():
    photo = Photo(helper.get_file('plain.jpg'))

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

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

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

    assert photo.is_valid()