From 5965bc2d39da40cb137ca3e223889239c53e6b76 Mon Sep 17 00:00:00 2001 From: djeck1432 Date: Mon, 25 Nov 2024 17:10:31 +0100 Subject: [PATCH] renamed --- web_app/{tests => }/test_integration/__init__.py | 0 web_app/{tests => }/test_integration/test_close_position.py | 5 ++++- web_app/{tests => }/test_integration/test_create_position.py | 0 3 files changed, 4 insertions(+), 1 deletion(-) rename web_app/{tests => }/test_integration/__init__.py (100%) rename web_app/{tests => }/test_integration/test_close_position.py (95%) rename web_app/{tests => }/test_integration/test_create_position.py (100%) diff --git a/web_app/tests/test_integration/__init__.py b/web_app/test_integration/__init__.py similarity index 100% rename from web_app/tests/test_integration/__init__.py rename to web_app/test_integration/__init__.py diff --git a/web_app/tests/test_integration/test_close_position.py b/web_app/test_integration/test_close_position.py similarity index 95% rename from web_app/tests/test_integration/test_close_position.py rename to web_app/test_integration/test_close_position.py index 7707c9c7..cff775e8 100644 --- a/web_app/tests/test_integration/test_close_position.py +++ b/web_app/test_integration/test_close_position.py @@ -4,10 +4,11 @@ import pytest from web_app.contract_tools.mixins.dashboard import DashboardMixin -from web_app.db.crud import PositionDBConnector, UserDBConnector +from web_app.db.crud import PositionDBConnector, UserDBConnector, AirDropDBConnector from web_app.db.models import Status user_db = UserDBConnector() +airdrop = AirDropDBConnector() position_db = PositionDBConnector() @@ -98,6 +99,8 @@ def test_close_position(self, form_data: Dict[str, Any]) -> None: ), "Position status should be 'closed' after close operation" # Clean up - delete the position and user + user = position_db.get_user_by_wallet_id(wallet_id) + airdrop.delete_all_users_airdrop(user.id) position_db.delete_position(position) if not position_db.get_positions_by_wallet_id(wallet_id): position_db.delete_user_by_wallet_id(wallet_id) diff --git a/web_app/tests/test_integration/test_create_position.py b/web_app/test_integration/test_create_position.py similarity index 100% rename from web_app/tests/test_integration/test_create_position.py rename to web_app/test_integration/test_create_position.py