Enhance tests to cover precision_filter correctly

This commit is contained in:
Matthias
2019-10-28 16:13:31 +01:00
parent b947f3c2a5
commit 466a3b87fc
2 changed files with 81 additions and 12 deletions

View File

@@ -572,6 +572,44 @@ def get_markets():
}
@pytest.fixture
def shitcoinmarkets(markets):
"""
Fixture with shitcoin markets - used to test filters in pairlists
"""
shitmarkets = deepcopy(markets)
shitmarkets.update({'HOT/BTC': {
'id': 'HOTBTC',
'symbol': 'HOT/BTC',
'base': 'HOT',
'quote': 'BTC',
'active': True,
'precision': {
'base': 8,
'quote': 8,
'amount': 0,
'price': 8
},
'limits': {
'amount': {
'min': 1.0,
'max': 90000000.0
},
'price': {
'min': None,
'max': None
},
'cost': {
'min': 0.001,
'max': None
}
},
'info': {},
},
})
return shitmarkets
@pytest.fixture
def markets_empty():
return MagicMock(return_value=[])
@@ -866,6 +904,28 @@ def tickers():
'quoteVolume': 1215.14489611,
'info': {}
},
'HOT/BTC': {
'symbol': 'HOT/BTC',
'timestamp': 1572273518661,
'datetime': '2019-10-28T14:38:38.661Z',
'high': 0.00000011,
'low': 0.00000009,
'bid': 0.0000001,
'bidVolume': 1476027288.0,
'ask': 0.00000011,
'askVolume': 820153831.0,
'vwap': 0.0000001,
'open': 0.00000009,
'close': 0.00000011,
'last': 0.00000011,
'previousClose': 0.00000009,
'change': 0.00000002,
'percentage': 22.222,
'average': None,
'baseVolume': 1442290324.0,
'quoteVolume': 143.78311994,
'info': {}
},
'ETH/USDT': {
'symbol': 'ETH/USDT',
'timestamp': 1522014804118,