Don't replace "-" when writing pair files

This commit is contained in:
Matthias 2021-11-28 15:08:02 +01:00
parent 7faa7539b4
commit 0d1324718c
2 changed files with 5 additions and 4 deletions

View File

@ -109,7 +109,7 @@ def file_load_json(file):
def pair_to_filename(pair: str) -> str: def pair_to_filename(pair: str) -> str:
for ch in ['/', '-', ' ', '.', '@', '$', '+', ':']: for ch in ['/', ' ', '.', '@', '$', '+', ':']:
pair = pair.replace(ch, '_') pair = pair.replace(ch, '_')
return pair return pair

View File

@ -71,9 +71,10 @@ def test_file_load_json(mocker, testdatadir) -> None:
("ETHH20", 'ETHH20'), ("ETHH20", 'ETHH20'),
(".XBTBON2H", '_XBTBON2H'), (".XBTBON2H", '_XBTBON2H'),
("ETHUSD.d", 'ETHUSD_d'), ("ETHUSD.d", 'ETHUSD_d'),
("ADA-0327", 'ADA_0327'), ("ADA-0327", 'ADA-0327'),
("BTC-USD-200110", 'BTC_USD_200110'), ("BTC-USD-200110", 'BTC-USD-200110'),
("F-AKRO/USDT", 'F_AKRO_USDT'), ("BTC-PERP:USDT", 'BTC-PERP_USDT'),
("F-AKRO/USDT", 'F-AKRO_USDT'),
("LC+/ETH", 'LC__ETH'), ("LC+/ETH", 'LC__ETH'),
("CMT@18/ETH", 'CMT_18_ETH'), ("CMT@18/ETH", 'CMT_18_ETH'),
("LBTC:1022/SAI", 'LBTC_1022_SAI'), ("LBTC:1022/SAI", 'LBTC_1022_SAI'),