Skip to content

Commit 5f2f7c6

Browse files
committed
Update test_fastapi.py
1 parent 2ab7f4c commit 5f2f7c6

1 file changed

Lines changed: 5 additions & 5 deletions

File tree

tests/test_serverless/test_modules/test_fastapi.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -231,11 +231,6 @@ def test_stream(self):
231231
"error": "Stream not supported, handler must be a generator."
232232
}
233233

234-
# Test webhook caller sent
235-
asyncio.run(worker_api._sim_run(input_object_with_webhook))
236-
asyncio.run(worker_api._sim_stream("test-123"))
237-
assert mock_threading.Thread.called
238-
239234
# Test with generator handler
240235
def generator_handler(job):
241236
del job
@@ -250,6 +245,11 @@ def generator_handler(job):
250245
"stream": [{"output": {"result": "success"}}]
251246
}
252247

248+
# Test webhook caller sent
249+
asyncio.run(generator_worker_api._sim_run(input_object_with_webhook))
250+
asyncio.run(generator_worker_api._sim_stream("test-123"))
251+
assert mock_threading.Thread.called
252+
253253
loop.close()
254254

255255
@pytest.mark.asyncio

0 commit comments

Comments
 (0)