Add some tests for datahandler

This commit is contained in:
Matthias
2019-12-27 13:16:53 +01:00
parent 8a030e7fc0
commit d65c1eea7a
2 changed files with 52 additions and 2 deletions

View File

@@ -83,7 +83,7 @@ class JsonDataHandler(IDataHandler):
:return: True when deleted, false if file did not exist.
"""
filename = self._pair_data_filename(self._datadir, pair, timeframe)
if filename.is_file():
if filename.exists():
filename.unlink()
return True
return False
@@ -119,7 +119,7 @@ class JsonDataHandler(IDataHandler):
filename = self._pair_trades_filename(self._datadir, pair)
misc.file_dump_json(filename, data, is_zip=self._use_zip)
def trades_append(self, pair: str, data: DataFrame):
def trades_append(self, pair: str, data: List[Dict]):
"""
Append data to existing files
:param pair: Pair - used for filename