generated from kyegomez/Python-Package-Template
-
-
Notifications
You must be signed in to change notification settings - Fork 14
Open
Labels
Description
In a container, with pytest-benchmark installed, python 3.10.13
pytest test_func_wrapper.py
================================= test session starts =================================
platform linux -- Python 3.10.13, pytest-7.4.3, pluggy-1.3.0
benchmark: 4.0.0 (defaults: timer=time.perf_counter disable_gc=False min_rounds=5 min_time=0.000005 max_time=1.0 calibration_precision=10 warmup=False warmup_iterations=100000)
rootdir: /usr/src/swarm_cloud/tests
plugins: benchmark-4.0.0, time-machine-2.13.0, anyio-3.7.1
collected 17 items
test_func_wrapper.py .FF..FFFFFFFFFFFF [100%]
====================================== FAILURES =======================================
____________________________________ test_add_put _____________________________________
func_api_wrapper = <swarms_cloud.func_api_wrapper.SwarmCloud object at 0x7fa99c932ec0>
def test_add_put(func_api_wrapper):
@func_api_wrapper.add("/test_put", method="put")
def test_put_endpoint():
return {"message": "test_put"}
client = TestClient(func_api_wrapper.app)
response = client.put("/test_put")
> assert response.status_code == 200
E assert 404 == 200
E + where 404 = <Response [404 Not Found]>.status_code
test_func_wrapper.py:81: AssertionError
---------------------------------- Captured log call ----------------------------------
INFO swarms_cloud.func_api_wrapper:func_api_wrapper.py:93 Error in test_put_endpoint: Invalid method: put
This means that the /test_put endpoint is not found when called with the method put.
Upvote & Fund
- We're using Polar.sh so you can upvote and help fund this issue.
- We receive the funding once the issue is completed & confirmed by you.
- Thank you in advance for helping prioritize & fund our backlog.
Reactions are currently unavailable