Skip to content

Commit

Permalink
tests: debug the image gen tests
Browse files Browse the repository at this point in the history
  • Loading branch information
tazlin committed Jun 3, 2024
1 parent 7098940 commit c1bc46d
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions tests/test_image.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import json
import requests

TEST_MODELS = ["Fustercluck", "AlbedoBase XL (SDXL)"]
Expand Down Expand Up @@ -53,7 +54,7 @@ def test_simple_image_gen(api_key: str, HORDE_URL: str, CIVERSION: str) -> None:
print("Request cancelled")
raise err
pop_results = pop_req.json()
# print(json.dumps(pop_results, indent=4))
print(json.dumps(pop_results, indent=4))

job_id = pop_results["id"]
try:
Expand All @@ -75,7 +76,7 @@ def test_simple_image_gen(api_key: str, HORDE_URL: str, CIVERSION: str) -> None:
retrieve_req = requests.get(f"{protocol}://{HORDE_URL}/api/v2/generate/status/{req_id}", headers=headers)
assert retrieve_req.ok, retrieve_req.text
retrieve_results = retrieve_req.json()
# print(json.dumps(retrieve_results,indent=4))
print(json.dumps(retrieve_results,indent=4))
assert len(retrieve_results["generations"]) == 1
gen = retrieve_results["generations"][0]
assert len(gen["gen_metadata"]) == 0
Expand Down

0 comments on commit c1bc46d

Please sign in to comment.