def test_all(self): with image.download(TestImage.SAMPLE_URL_1) as save_path: image.resize(save_path, width=200) assert os.path.isfile(save_path) is True url = image.upload_to_gyazo(save_path) # use .env assert url is not "" assert os.path.isfile(save_path) is False
def test_convert_error(self): image.resize(str(uuid.uuid4()))
def test_convert2(self, url): with image.download(url) as save_path: image.resize(save_path, width=500)
def test_convert(self): with image.download(TestImage.SAMPLE_URL_1) as save_path: image.resize(save_path)
def test_all_invalid_token(self): with image.download(TestImage.SAMPLE_URL_1) as save_path: image.resize(save_path) image.upload_to_gyazo(save_path, "invalid_token")