mirror of
https://github.com/AUTOMATIC1111/stable-diffusion-webui.git
synced 2025-08-08 13:19:54 +00:00
remove some code duplication
remove calls to locals() add a test for img2img with script
This commit is contained in:
@@ -50,6 +50,12 @@ class TestImg2ImgWorking(unittest.TestCase):
|
||||
self.simple_img2img["mask"] = encode_pil_to_base64(Image.open(r"test/test_files/mask_basic.png"))
|
||||
self.assertEqual(requests.post(self.url_img2img, json=self.simple_img2img).status_code, 200)
|
||||
|
||||
def test_img2img_sd_upscale_performed(self):
|
||||
self.simple_img2img["script_name"] = "sd upscale"
|
||||
self.simple_img2img["script_args"] = ["", 8, "Lanczos", 2.0]
|
||||
|
||||
self.assertEqual(requests.post(self.url_img2img, json=self.simple_img2img).status_code, 200)
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
unittest.main()
|
||||
|
Reference in New Issue
Block a user