Merge pull request #3062 from Fredrik81/plot-trades

Plotting: Fix if no file exists and new skip option
This commit is contained in:
Matthias
2020-03-18 20:00:50 +01:00
committed by GitHub
7 changed files with 87 additions and 29 deletions

View File

@@ -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"]