Merge pull request #3062 from Fredrik81/plot-trades
Plotting: Fix if no file exists and new skip option
This commit is contained in:
@@ -105,6 +105,7 @@ def test_load_trades(default_conf, mocker):
|
||||
load_trades("DB",
|
||||
db_url=default_conf.get('db_url'),
|
||||
exportfilename=default_conf.get('exportfilename'),
|
||||
no_trades=False
|
||||
)
|
||||
|
||||
assert db_mock.call_count == 1
|
||||
@@ -115,11 +116,24 @@ def test_load_trades(default_conf, mocker):
|
||||
default_conf['exportfilename'] = Path("testfile.json")
|
||||
load_trades("file",
|
||||
db_url=default_conf.get('db_url'),
|
||||
exportfilename=default_conf.get('exportfilename'),)
|
||||
exportfilename=default_conf.get('exportfilename'),
|
||||
)
|
||||
|
||||
assert db_mock.call_count == 0
|
||||
assert bt_mock.call_count == 1
|
||||
|
||||
db_mock.reset_mock()
|
||||
bt_mock.reset_mock()
|
||||
default_conf['exportfilename'] = "testfile.json"
|
||||
load_trades("file",
|
||||
db_url=default_conf.get('db_url'),
|
||||
exportfilename=default_conf.get('exportfilename'),
|
||||
no_trades=True
|
||||
)
|
||||
|
||||
assert db_mock.call_count == 0
|
||||
assert bt_mock.call_count == 0
|
||||
|
||||
|
||||
def test_combine_dataframes_with_mean(testdatadir):
|
||||
pairs = ["ETH/BTC", "ADA/BTC"]
|
||||
|
Reference in New Issue
Block a user