Skip to content

Commit

Permalink
Add test for plot-profit
Browse files Browse the repository at this point in the history
  • Loading branch information
xmatthias committed Aug 24, 2019
1 parent f7cb75f commit c559f95
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions freqtrade/tests/test_plotting.py
Original file line number Diff line number Diff line change
Expand Up @@ -315,3 +315,18 @@ def test_analyse_and_plot_pairs(default_conf, mocker, caplog):
assert candle_mock.call_args_list[0][1]['indicators2'] == ['macd']

assert log_has("End of plotting process. 2 plots generated", caplog)


def start_plot_profit(mocker):
aup = mocker.patch("freqtrade.plot.plotting.plot_profit", MagicMock())
args = [
"--config", "config.json.example",
"plot-profit",
"--pairs", "ETH/BTC"
]
start_plot_profit(get_args(args))

assert aup.call_count == 1
called_config = aup.call_args_list[0][0][0]
assert "pairs" in called_config
assert called_config['pairs'] == ["ETH/BTC"]

0 comments on commit c559f95

Please sign in to comment.