Rename defaultStrategy file

This commit is contained in:
Matthias 2021-08-26 19:38:41 +02:00
parent 6d96b11279
commit 07d71f014f
6 changed files with 10 additions and 10 deletions

View File

@ -694,7 +694,7 @@ def test_backtest_pricecontours(default_conf, fee, mocker, testdatadir,
def test_backtest_clash_buy_sell(mocker, default_conf, testdatadir):
# Override the default buy trend function in our default_strategy
# Override the default buy trend function in our StrategyTestV2
def fun(dataframe=None, pair=None):
buy_value = 1
sell_value = 1
@ -710,7 +710,7 @@ def test_backtest_clash_buy_sell(mocker, default_conf, testdatadir):
def test_backtest_only_sell(mocker, default_conf, testdatadir):
# Override the default buy trend function in our default_strategy
# Override the default buy trend function in our StrategyTestV2
def fun(dataframe=None, pair=None):
buy_value = 0
sell_value = 1

View File

@ -169,7 +169,7 @@ def test_get_strategy_filename(default_conf):
x = HyperoptTools.get_strategy_filename(default_conf, 'StrategyTestV2')
assert isinstance(x, Path)
assert x == Path(__file__).parents[1] / 'strategy/strats/default_strategy.py'
assert x == Path(__file__).parents[1] / 'strategy/strats/strategy_test_v2.py'
x = HyperoptTools.get_strategy_filename(default_conf, 'NonExistingStrategy')
assert x is None
@ -262,7 +262,7 @@ def test_try_export_params(default_conf, tmpdir, caplog, mocker):
assert export_mock.call_count == 1
assert export_mock.call_args_list[0][0][1] == 'StrategyTestV2'
assert export_mock.call_args_list[0][0][2].name == 'default_strategy.json'
assert export_mock.call_args_list[0][0][2].name == 'strategy_test_v2.json'
def test_params_print(capsys):

View File

@ -1217,8 +1217,8 @@ def test_api_strategies(botclient):
assert_response(rc)
assert rc.json() == {'strategies': [
'StrategyTestV2',
'HyperoptableStrategy',
'StrategyTestV2',
'TestStrategyLegacyV1'
]}
@ -1231,7 +1231,7 @@ def test_api_strategy(botclient):
assert_response(rc)
assert rc.json()['strategy'] == 'StrategyTestV2'
data = (Path(__file__).parents[1] / "strategy/strats/default_strategy.py").read_text()
data = (Path(__file__).parents[1] / "strategy/strats/strategy_test_v2.py").read_text()
assert rc.json()['code'] == data
rc = client_get(client, f"{BASE_URI}/strategy/NoStrat")

View File

@ -4,10 +4,10 @@ from pandas import DataFrame
from freqtrade.persistence.models import Trade
from .strats.default_strategy import StrategyTestV2
from .strats.strategy_test_v2 import StrategyTestV2
def test_default_strategy_structure():
def test_strategy_test_v2_structure():
assert hasattr(StrategyTestV2, 'minimal_roi')
assert hasattr(StrategyTestV2, 'stoploss')
assert hasattr(StrategyTestV2, 'timeframe')
@ -16,7 +16,7 @@ def test_default_strategy_structure():
assert hasattr(StrategyTestV2, 'populate_sell_trend')
def test_default_strategy(result, fee):
def test_strategy_test_v2(result, fee):
strategy = StrategyTestV2({})
metadata = {'pair': 'ETH/BTC'}

View File

@ -22,7 +22,7 @@ from freqtrade.strategy.interface import SellCheckTuple
from freqtrade.strategy.strategy_wrapper import strategy_safe_wrapper
from tests.conftest import log_has, log_has_re
from .strats.default_strategy import StrategyTestV2
from .strats.strategy_test_v2 import StrategyTestV2
# Avoid to reinit the same object again and again