change format of health fixture and get_market_summaries fixture

This commit is contained in:
Matthias Voppichler 2018-03-24 20:32:42 +01:00
parent 22ef860312
commit 82a2144296

View File

@ -128,32 +128,31 @@ def ticker_sell_down():
@pytest.fixture @pytest.fixture
def health(): def health():
return MagicMock(return_value=[{ return MagicMock(return_value={
'Currency': 'BTC', "ETH/BTC": {
'IsActive': True, 'base': 'ETH',
'LastChecked': '2017-11-13T20:15:00.00', 'active': True,
'Notice': None 'LastChecked': '2017-11-13T20:15:00.00',
}, { 'Notice': None
'Currency': 'ETH', },
'IsActive': True, "TRST/BTC": {
'LastChecked': '2017-11-13T20:15:00.00', 'base': 'TRST',
'Notice': None 'active': True,
}, { 'LastChecked': '2017-11-13T20:15:00.00',
'Currency': 'TRST', 'Notice': None
'IsActive': True, },
'LastChecked': '2017-11-13T20:15:00.00', "SWT/BTC": {
'Notice': None 'base': 'SWT',
}, { 'active': True,
'Currency': 'SWT', 'LastChecked': '2017-11-13T20:15:00.00',
'IsActive': True, 'Notice': None
'LastChecked': '2017-11-13T20:15:00.00', },
'Notice': None "BCC/BTC": {
}, { 'base': 'BCC',
'Currency': 'BCC', 'active': False,
'IsActive': False, 'LastChecked': '2017-11-13T20:15:00.00',
'LastChecked': '2017-11-13T20:15:00.00', 'Notice': None
'Notice': None }})
}])
@pytest.fixture @pytest.fixture
@ -307,125 +306,149 @@ def get_market_summaries_data():
8 entries. 4 BTC, 4 USTD 8 entries. 4 BTC, 4 USTD
:return: JSON market summaries :return: JSON market summaries
""" """
return [ return {
{ 'XWC/BTC': {
'Ask': 1.316e-05, 'symbol': 'XWC/BTC',
'BaseVolume': 5.72599471, 'info': {
'Bid': 1.3e-05, 'Ask': 1.316e-05,
'Created': '2014-04-14T00:00:00', 'BaseVolume': 5.72599471,
'High': 1.414e-05, 'Bid': 1.3e-05,
'Last': 1.298e-05, 'Created': '2014-04-14T00:00:00',
'Low': 1.282e-05, 'High': 1.414e-05,
'MarketName': 'BTC-XWC', 'Last': 1.298e-05,
'OpenBuyOrders': 2000, 'Low': 1.282e-05,
'OpenSellOrders': 1484, 'MarketName': 'BTC-XWC',
'PrevDay': 1.376e-05, 'OpenBuyOrders': 2000,
'TimeStamp': '2018-02-05T01:32:40.493', 'OpenSellOrders': 1484,
'Volume': 424041.21418375 'PrevDay': 1.376e-05,
'TimeStamp': '2018-02-05T01:32:40.493',
'Volume': 424041.21418375
}
}, },
{ 'XZC/BTC': {
'Ask': 0.00627051, 'symbol': 'XZC/BTC',
'BaseVolume': 93.23302388, 'info': {
'Bid': 0.00618192, 'Ask': 0.00627051,
'Created': '2016-10-20T04:48:30.387', 'BaseVolume': 93.23302388,
'High': 0.00669897, 'Bid': 0.00618192,
'Last': 0.00618192, 'Created': '2016-10-20T04:48:30.387',
'Low': 0.006, 'High': 0.00669897,
'MarketName': 'BTC-XZC', 'Last': 0.00618192,
'OpenBuyOrders': 343, 'Low': 0.006,
'OpenSellOrders': 2037, 'MarketName': 'BTC-XZC',
'PrevDay': 0.00668229, 'OpenBuyOrders': 343,
'TimeStamp': '2018-02-05T01:32:43.383', 'OpenSellOrders': 2037,
'Volume': 14863.60730702 'PrevDay': 0.00668229,
'TimeStamp': '2018-02-05T01:32:43.383',
'Volume': 14863.60730702
}
}, },
{ 'ZCL/BTC': {
'Ask': 0.01137247, 'symbol': 'ZCL/BTC',
'BaseVolume': 383.55922657, 'info': {
'Bid': 0.01136006, 'Ask': 0.01137247,
'Created': '2016-11-15T20:29:59.73', 'BaseVolume': 383.55922657,
'High': 0.012, 'Bid': 0.01136006,
'Last': 0.01137247, 'Created': '2016-11-15T20:29:59.73',
'Low': 0.01119883, 'High': 0.012,
'MarketName': 'BTC-ZCL', 'Last': 0.01137247,
'OpenBuyOrders': 1332, 'Low': 0.01119883,
'OpenSellOrders': 5317, 'MarketName': 'BTC-ZCL',
'PrevDay': 0.01179603, 'OpenBuyOrders': 1332,
'TimeStamp': '2018-02-05T01:32:42.773', 'OpenSellOrders': 5317,
'Volume': 33308.07358285 'PrevDay': 0.01179603,
'TimeStamp': '2018-02-05T01:32:42.773',
'Volume': 33308.07358285
}
}, },
{ 'ZEC/BTC': {
'Ask': 0.04155821, 'symbol': 'ZEC/BTC',
'BaseVolume': 274.75369074, 'info': {
'Bid': 0.04130002, 'Ask': 0.04155821,
'Created': '2016-10-28T17:13:10.833', 'BaseVolume': 274.75369074,
'High': 0.04354429, 'Bid': 0.04130002,
'Last': 0.041585, 'Created': '2016-10-28T17:13:10.833',
'Low': 0.0413, 'High': 0.04354429,
'MarketName': 'BTC-ZEC', 'Last': 0.041585,
'OpenBuyOrders': 863, 'Low': 0.0413,
'OpenSellOrders': 5579, 'MarketName': 'BTC-ZEC',
'PrevDay': 0.0429, 'OpenBuyOrders': 863,
'TimeStamp': '2018-02-05T01:32:43.21', 'OpenSellOrders': 5579,
'Volume': 6479.84033259 'PrevDay': 0.0429,
'TimeStamp': '2018-02-05T01:32:43.21',
'Volume': 6479.84033259
}
}, },
{ 'XMR/USDT': {
'Ask': 210.99999999, 'symbol': 'XMR/USDT',
'BaseVolume': 615132.70989532, 'info': {
'Bid': 210.05503736, 'Ask': 210.99999999,
'Created': '2017-07-21T01:08:49.397', 'BaseVolume': 615132.70989532,
'High': 257.396, 'Bid': 210.05503736,
'Last': 211.0, 'Created': '2017-07-21T01:08:49.397',
'Low': 209.05333589, 'High': 257.396,
'MarketName': 'USDT-XMR', 'Last': 211.0,
'OpenBuyOrders': 180, 'Low': 209.05333589,
'OpenSellOrders': 1203, 'MarketName': 'USDT-XMR',
'PrevDay': 247.93528899, 'OpenBuyOrders': 180,
'TimeStamp': '2018-02-05T01:32:43.117', 'OpenSellOrders': 1203,
'Volume': 2688.17410793 'PrevDay': 247.93528899,
'TimeStamp': '2018-02-05T01:32:43.117',
'Volume': 2688.17410793
}
}, },
{ 'XRP/USDT': {
'Ask': 0.79589979, 'symbol': 'XRP/USDT',
'BaseVolume': 9349557.01853031, 'info': {
'Bid': 0.789226, 'Ask': 0.79589979,
'Created': '2017-07-14T17:10:10.737', 'BaseVolume': 9349557.01853031,
'High': 0.977, 'Bid': 0.789226,
'Last': 0.79589979, 'Created': '2017-07-14T17:10:10.737',
'Low': 0.781, 'High': 0.977,
'MarketName': 'USDT-XRP', 'Last': 0.79589979,
'OpenBuyOrders': 1075, 'Low': 0.781,
'OpenSellOrders': 6508, 'MarketName': 'USDT-XRP',
'PrevDay': 0.93300218, 'OpenBuyOrders': 1075,
'TimeStamp': '2018-02-05T01:32:42.383', 'OpenSellOrders': 6508,
'Volume': 10801663.00788851 'PrevDay': 0.93300218,
'TimeStamp': '2018-02-05T01:32:42.383',
'Volume': 10801663.00788851
}
}, },
{ 'XVG/USDT': {
'Ask': 0.05154982, 'symbol': 'XVG/USDT',
'BaseVolume': 2311087.71232136, 'info': {
'Bid': 0.05040107, 'Ask': 0.05154982,
'Created': '2017-12-29T19:29:18.357', 'BaseVolume': 2311087.71232136,
'High': 0.06668561, 'Bid': 0.05040107,
'Last': 0.0508, 'Created': '2017-12-29T19:29:18.357',
'Low': 0.05006731, 'High': 0.06668561,
'MarketName': 'USDT-XVG', 'Last': 0.0508,
'OpenBuyOrders': 655, 'Low': 0.05006731,
'OpenSellOrders': 5544, 'MarketName': 'USDT-XVG',
'PrevDay': 0.0627, 'OpenBuyOrders': 655,
'TimeStamp': '2018-02-05T01:32:41.507', 'OpenSellOrders': 5544,
'Volume': 40031424.2152716 'PrevDay': 0.0627,
'TimeStamp': '2018-02-05T01:32:41.507',
'Volume': 40031424.2152716
}
}, },
{ 'ZEC/USDT': {
'Ask': 332.65500022, 'symbol': 'ZEC/USDT',
'BaseVolume': 562911.87455665, 'info': {
'Bid': 330.00000001, 'Ask': 332.65500022,
'Created': '2017-07-14T17:10:10.673', 'BaseVolume': 562911.87455665,
'High': 401.59999999, 'Bid': 330.00000001,
'Last': 332.65500019, 'Created': '2017-07-14T17:10:10.673',
'Low': 330.0, 'High': 401.59999999,
'MarketName': 'USDT-ZEC', 'Last': 332.65500019,
'OpenBuyOrders': 161, 'Low': 330.0,
'OpenSellOrders': 1731, 'MarketName': 'USDT-ZEC',
'PrevDay': 391.42, 'OpenBuyOrders': 161,
'TimeStamp': '2018-02-05T01:32:42.947', 'OpenSellOrders': 1731,
'Volume': 1571.09647946 'PrevDay': 391.42,
'TimeStamp': '2018-02-05T01:32:42.947',
'Volume': 1571.09647946
}
} }
] }