diff --git a/freqtrade/utils/__init__.py b/freqtrade/utils/__init__.py deleted file mode 100644 index 361a06c38..000000000 --- a/freqtrade/utils/__init__.py +++ /dev/null @@ -1,3 +0,0 @@ -# flake8: noqa: F401 - -from freqtrade.utils.get_sides import get_sides diff --git a/freqtrade/utils/get_sides.py b/freqtrade/utils/get_sides.py deleted file mode 100644 index 9ab97e7b3..000000000 --- a/freqtrade/utils/get_sides.py +++ /dev/null @@ -1,5 +0,0 @@ -from typing import Tuple - - -def get_sides(is_short: bool) -> Tuple[str, str]: - return ("sell", "buy") if is_short else ("buy", "sell") diff --git a/tests/conftest.py b/tests/conftest.py index 188236f40..609823409 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -6,6 +6,7 @@ from copy import deepcopy from datetime import datetime, timedelta from functools import reduce from pathlib import Path +from typing import Tuple from unittest.mock import MagicMock, Mock, PropertyMock import arrow @@ -262,6 +263,10 @@ def create_mock_trades_with_leverage(fee, use_db: bool = True): Trade.query.session.flush() +def get_sides(is_short: bool) -> Tuple[str, str]: + return ("sell", "buy") if is_short else ("buy", "sell") + + @pytest.fixture(autouse=True) def patch_coingekko(mocker) -> None: """ diff --git a/tests/test_persistence.py b/tests/test_persistence.py index 800e3f541..dbb1133c3 100644 --- a/tests/test_persistence.py +++ b/tests/test_persistence.py @@ -13,8 +13,8 @@ from sqlalchemy import create_engine, inspect, text from freqtrade import constants from freqtrade.exceptions import DependencyException, OperationalException from freqtrade.persistence import LocalTrade, Order, Trade, clean_dry_run_db, init_db -from freqtrade.utils import get_sides -from tests.conftest import create_mock_trades, create_mock_trades_with_leverage, log_has, log_has_re +from tests.conftest import (create_mock_trades, create_mock_trades_with_leverage, get_sides, + log_has, log_has_re) def test_init_create_session(default_conf):