mirror of
https://github.com/UofCBaja/Interview-Backend.git
synced 2025-07-06 03:07:16 -06:00
feat(Packagers): started testing for post requests
This commit is contained in:
13
testhttp.py
13
testhttp.py
@ -13,6 +13,13 @@ def BenchMarkDjango():
|
||||
# print(json.dumps(res, indent=1))
|
||||
|
||||
if __name__ == "__main__":
|
||||
djangoTime = timeit.timeit(stmt=BenchMarkDjango, number=10)
|
||||
pythonTime = timeit.timeit(stmt=BenchMarkServer, number=10)
|
||||
print(f"FastAPI: {djangoTime}\nPython: {pythonTime}")
|
||||
test = 0
|
||||
if test:
|
||||
djangoTime = timeit.timeit(stmt=BenchMarkDjango, number=10)
|
||||
pythonTime = timeit.timeit(stmt=BenchMarkServer, number=10)
|
||||
print(f"FastAPI: {djangoTime}\nPython: {pythonTime}")
|
||||
|
||||
reqbody = {
|
||||
"body": {"message": "hello"}
|
||||
}
|
||||
rawRes = requests.post("http://localhost:8000/SelectInterview", reqbody)
|
||||
|
Reference in New Issue
Block a user