summaryrefslogtreecommitdiff
path: root/t/manual/flask.py
diff options
context:
space:
mode:
authorbd <bdunahu@operationnull.com>2025-07-19 22:21:10 -0600
committerbd <bdunahu@operationnull.com>2025-07-19 22:21:10 -0600
commitac55d9ff0b588b91202ccad72ee71e508e33ad08 (patch)
tree4933b49b67f1affa16f8e7c63e0d214bfa7d62e8 /t/manual/flask.py
parentd08f067f8f470b440b563293397116d6036c4d71 (diff)
Reformat repository to allow for new unit tests
Diffstat (limited to 't/manual/flask.py')
-rw-r--r--t/manual/flask.py26
1 files changed, 26 insertions, 0 deletions
diff --git a/t/manual/flask.py b/t/manual/flask.py
new file mode 100644
index 0000000..57951b6
--- /dev/null
+++ b/t/manual/flask.py
@@ -0,0 +1,26 @@
+#!/usr/bin/env -S python3 -m flask --app
+import asyncio
+import os
+import signal
+import time
+from flask import Flask
+
+app = Flask(__name__)
+
+async def query_db():
+ await asyncio.sleep(2.0)
+ return 1
+
+@app.route("/")
+async def hello_world():
+ await asyncio.sleep(10.0)
+ return "<p>Hello, World!</p>"
+
+@app.route("/die")
+async def die():
+ await asyncio.sleep(2.0)
+ os.kill(os.getpid(), signal.SIGINT)
+ return "You've killed me!"
+
+if __name__ == "__main__":
+ app.run(debug=True)