mirror of
https://github.com/freqtrade/freqtrade.git
synced 2024-11-10 02:12:01 +00:00
Update final tests
This commit is contained in:
parent
ec2960a167
commit
2babb36fc2
|
@ -1396,7 +1396,7 @@ def test_start_list_data(testdatadir, capsys):
|
|||
pargs['config'] = None
|
||||
start_list_data(pargs)
|
||||
captured = capsys.readouterr()
|
||||
assert "Found 17 pair / timeframe combinations." in captured.out
|
||||
assert "Found 16 pair / timeframe combinations." in captured.out
|
||||
assert "\n| Pair | Timeframe | Type |\n" in captured.out
|
||||
assert "\n| UNITTEST/BTC | 1m, 5m, 8m, 30m | spot |\n" in captured.out
|
||||
|
||||
|
|
|
@ -98,7 +98,6 @@ def test_datahandler_ohlcv_get_available_data(testdatadir):
|
|||
('XRP/ETH', '5m', CandleType.SPOT),
|
||||
('UNITTEST/BTC', '30m', CandleType.SPOT),
|
||||
('UNITTEST/BTC', '8m', CandleType.SPOT),
|
||||
('NOPAIR/XXX', '4m', CandleType.SPOT),
|
||||
}
|
||||
|
||||
paircombs = FeatherDataHandler.ohlcv_get_available_data(testdatadir, TradingMode.FUTURES)
|
||||
|
@ -140,16 +139,16 @@ def test_jsondatahandler_ohlcv_purge(mocker, testdatadir):
|
|||
|
||||
def test_jsondatahandler_ohlcv_load(testdatadir, caplog):
|
||||
dh = JsonDataHandler(testdatadir)
|
||||
df = dh.ohlcv_load('XRP/ETH', '5m', 'spot')
|
||||
assert len(df) == 712
|
||||
# df = dh.ohlcv_load('XRP/ETH', '5m', 'spot')
|
||||
# assert len(df) == 712
|
||||
|
||||
df_mark = dh.ohlcv_load('UNITTEST/USDT:USDT', '1h', candle_type="mark")
|
||||
assert len(df_mark) == 100
|
||||
# df_mark = dh.ohlcv_load('UNITTEST/USDT:USDT', '1h', candle_type="mark")
|
||||
# assert len(df_mark) == 100
|
||||
|
||||
df_no_mark = dh.ohlcv_load('UNITTEST/USDT', '1h', 'spot')
|
||||
assert len(df_no_mark) == 0
|
||||
df = dh.ohlcv_load('UNITTEST/BTC', '1m', 'spot')
|
||||
assert len(df) > 0
|
||||
|
||||
# Failure case (empty array)
|
||||
# # Failure case (empty array)
|
||||
df1 = dh.ohlcv_load('NOPAIR/XXX', '4m', 'spot')
|
||||
assert len(df1) == 0
|
||||
assert log_has("Could not load data for NOPAIR/XXX.", caplog)
|
||||
|
|
|
@ -1779,7 +1779,7 @@ def test_list_available_pairs(botclient):
|
|||
rc = client_get(client, f"{BASE_URI}/available_pairs")
|
||||
|
||||
assert_response(rc)
|
||||
assert rc.json()['length'] == 13
|
||||
assert rc.json()['length'] == 12
|
||||
assert isinstance(rc.json()['pairs'], list)
|
||||
|
||||
rc = client_get(client, f"{BASE_URI}/available_pairs?timeframe=5m")
|
||||
|
|
0
tests/testdata/NOPAIR_XXX-4m.feather
vendored
0
tests/testdata/NOPAIR_XXX-4m.feather
vendored
1
tests/testdata/NOPAIR_XXX-4m.json
vendored
Normal file
1
tests/testdata/NOPAIR_XXX-4m.json
vendored
Normal file
|
@ -0,0 +1 @@
|
|||
[]
|
Loading…
Reference in New Issue
Block a user