Removed utils, moved get_sides to conftest

This commit is contained in:
Sam Germain 2021-09-16 16:25:02 -06:00
parent 5fcb69a0b5
commit dec2f377ff
4 changed files with 7 additions and 10 deletions

View File

@ -1,3 +0,0 @@
# flake8: noqa: F401
from freqtrade.utils.get_sides import get_sides

View File

@ -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")

View File

@ -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:
"""

View File

@ -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):