mirror of
https://github.com/freqtrade/freqtrade.git
synced 2025-12-02 01:53:05 +00:00
refactor: pair_history should only be available in webserver mode
This commit is contained in:
@@ -1914,6 +1914,15 @@ def test_api_pair_history(botclient, tmp_path, mocker):
|
||||
|
||||
timeframe = "5m"
|
||||
lfm = mocker.patch("freqtrade.strategy.interface.IStrategy.load_freqAI_model")
|
||||
# Wrong mode
|
||||
rc = client_get(
|
||||
client,
|
||||
f"{BASE_URI}/pair_history?timeframe={timeframe}"
|
||||
f"&timerange=20180111-20180112&strategy={CURRENT_TEST_STRATEGY}",
|
||||
)
|
||||
assert_response(rc, 503)
|
||||
_ftbot.config["runmode"] = RunMode.WEBSERVER
|
||||
|
||||
# No pair
|
||||
rc = client_get(
|
||||
client,
|
||||
|
||||
Reference in New Issue
Block a user