def test_thumb_from_file_temp_partial(self): fn = NamedTemporaryFile() with open(self.filename, "rb") as h: fn.write(h.read(10)) fn.flush() fn.seek(0, 0) thumb = thumbnails.get_thumbnail_from_file(fn, (50, 60)) self.assertTrue(thumb is None) fn.close()
def test_thumb_from_file_temp_partial(self): fn = NamedTemporaryFile() with open(self.filename, "rb") as h: fn.write(h.read(10)) fn.flush() fn.seek(0, 0) thumb = thumbnails.get_thumbnail_from_file(fn, (50, 60)) self.assertTrue(thumb is None) fn.close()