Skip to content

Commit

Permalink
fix some errors
Browse files Browse the repository at this point in the history
Signed-off-by: technillogue <technillogue@gmail.com>
  • Loading branch information
technillogue committed Mar 26, 2024
1 parent f963e4f commit 9cd0600
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions python/tests/server/test_webhook.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
from cog.server.webhook import webhook_caller, webhook_caller_filtered
from responses import registries

processing = PredictionResponse(input={}, output=status=Status.PROCESSING)
payload = {"status": "processing", "logs": "giraffe", "input": {}}
processing = PredictionResponse(**payload)

Expand Down Expand Up @@ -44,19 +43,19 @@ def test_webhook_caller_terminal_retries():
resps.append(
responses.post(
"https://example.com/webhook/123",
json={"status": "succeeded", "animal": "giraffe"},
json=payload,
status=429,
)
)
resps.append(
responses.post(
"https://example.com/webhook/123",
json={"status": "succeeded", "animal": "giraffe"},
json=payload,
status=200,
)
)

c({"status": "succeeded", "animal": "giraffe"})
c(processing)

assert all(r.call_count == 1 for r in resps)

Expand Down

0 comments on commit 9cd0600

Please sign in to comment.