aboutsummaryrefslogtreecommitdiff
path: root/test/test_extras.py
diff options
context:
space:
mode:
authorAUTOMATIC1111 <16777216c@gmail.com>2023-05-22 07:15:34 +0300
committerGitHub <noreply@github.com>2023-05-22 07:15:34 +0300
commit8137bdba61fd57cc1ddae801f6080d51e13d70c5 (patch)
treec5a02e9f9ae57c9f0ff8499379c6cc61a97c094e /test/test_extras.py
parenta862428902c4aecde8852761c3a4d95c196885cb (diff)
parent3366e494a1147e570d8527eea19da88edb3a1e0c (diff)
Merge branch 'dev' into text-drag-fix
Diffstat (limited to 'test/test_extras.py')
-rw-r--r--test/test_extras.py35
1 files changed, 35 insertions, 0 deletions
diff --git a/test/test_extras.py b/test/test_extras.py
new file mode 100644
index 00000000..799d9fad
--- /dev/null
+++ b/test/test_extras.py
@@ -0,0 +1,35 @@
+import requests
+
+
+def test_simple_upscaling_performed(base_url, img2img_basic_image_base64):
+ payload = {
+ "resize_mode": 0,
+ "show_extras_results": True,
+ "gfpgan_visibility": 0,
+ "codeformer_visibility": 0,
+ "codeformer_weight": 0,
+ "upscaling_resize": 2,
+ "upscaling_resize_w": 128,
+ "upscaling_resize_h": 128,
+ "upscaling_crop": True,
+ "upscaler_1": "Lanczos",
+ "upscaler_2": "None",
+ "extras_upscaler_2_visibility": 0,
+ "image": img2img_basic_image_base64,
+ }
+ assert requests.post(f"{base_url}/sdapi/v1/extra-single-image", json=payload).status_code == 200
+
+
+def test_png_info_performed(base_url, img2img_basic_image_base64):
+ payload = {
+ "image": img2img_basic_image_base64,
+ }
+ assert requests.post(f"{base_url}/sdapi/v1/extra-single-image", json=payload).status_code == 200
+
+
+def test_interrogate_performed(base_url, img2img_basic_image_base64):
+ payload = {
+ "image": img2img_basic_image_base64,
+ "model": "clip",
+ }
+ assert requests.post(f"{base_url}/sdapi/v1/extra-single-image", json=payload).status_code == 200