'generate_thumbnail replaces old thumbnail.'

def test_generate_thumbnail_twice(self):

    image = self._image_with_thumbnail()
    old_path = image.thumbnail.path
    assert os.path.isfile(old_path)
    generate_thumbnail(image, 'file', 'thumbnail')
    new_path = image.thumbnail.path
    assert os.path.isfile(new_path)
    if (old_path != new_path):
        assert (not os.path.exists(old_path))
