Merge pull request #2564 from freqtrade/plots_plot

[minor] Adjust plotting test to match user_data folder
This commit is contained in:
hroff-1902 2019-11-23 21:07:46 +03:00 committed by GitHub
commit 26a2292f6d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -212,9 +212,9 @@ def test_generate_plot_file(mocker, caplog):
fig = generate_empty_figure() fig = generate_empty_figure()
plot_mock = mocker.patch("freqtrade.plot.plotting.plot", MagicMock()) plot_mock = mocker.patch("freqtrade.plot.plotting.plot", MagicMock())
store_plot_file(fig, filename="freqtrade-plot-UNITTEST_BTC-5m.html", store_plot_file(fig, filename="freqtrade-plot-UNITTEST_BTC-5m.html",
directory=Path("user_data/plots")) directory=Path("user_data/plot"))
expected_fn = str(Path("user_data/plots/freqtrade-plot-UNITTEST_BTC-5m.html")) expected_fn = str(Path("user_data/plot/freqtrade-plot-UNITTEST_BTC-5m.html"))
assert plot_mock.call_count == 1 assert plot_mock.call_count == 1
assert plot_mock.call_args[0][0] == fig assert plot_mock.call_args[0][0] == fig
assert (plot_mock.call_args_list[0][1]['filename'] assert (plot_mock.call_args_list[0][1]['filename']