diff --git a/litecord/blueprints/admin_api/users.py b/litecord/blueprints/admin_api/users.py index c1df4e8..b8b0acd 100644 --- a/litecord/blueprints/admin_api/users.py +++ b/litecord/blueprints/admin_api/users.py @@ -145,5 +145,5 @@ async def patch_user(user_id: int): user_id, ) - public_user, _ = await mass_user_update(user_id, app) + public_user, _ = await mass_user_update(user_id) return jsonify(public_user) diff --git a/tests/conftest.py b/tests/conftest.py index ed9e294..9d83a9e 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -93,7 +93,8 @@ async def _user_fixture_setup(app): async def _user_fixture_teardown(app, udata: dict): - await delete_user(udata["id"], app_=app) + async with app.app_context(): + await delete_user(udata["id"]) @pytest.fixture(name="test_user")