Add handling for gzip files

This commit is contained in:
Matthias Voppichler
2018-03-30 23:30:23 +02:00
parent 756bd63e1d
commit a4906c477e
3 changed files with 33 additions and 21 deletions

View File

@@ -71,3 +71,8 @@ def test_file_dump_json(mocker) -> None:
file_dump_json('somefile', [1, 2, 3])
assert file_open.call_count == 1
assert json_dump.call_count == 1
file_open = mocker.patch('freqtrade.misc.gzip.open', MagicMock())
json_dump = mocker.patch('json.dump', MagicMock())
file_dump_json('somefile', [1, 2, 3], True)
assert file_open.call_count == 1
assert json_dump.call_count == 1