- Sort Score
- Result 10 results
- Languages All
Results 1 - 1 of 1 for reset_state_and_db (0.11 sec)
-
tests/test_dependency_normal_exceptions.py
@app.put("/user/{user_id}") def put_user(user_id: str, name: str = Body(), db: dict = Depends(get_database)): db[user_id] = name return {"message": "OK"} @pytest.fixture(autouse=True) def reset_state_and_db(): global fake_database global state fake_database = initial_fake_database.copy() state = initial_state.copy() client = TestClient(app) def test_dependency_gets_exception():
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sat Feb 24 23:06:37 UTC 2024 - 1.9K bytes - Viewed (0)