apiserver: implement tests for start() and stop()

This commit is contained in:
gcarq
2018-06-23 12:52:29 +02:00
parent d0b729e78e
commit a0c9a9585d
3 changed files with 64 additions and 2 deletions

View File

@@ -1,3 +1,4 @@
import json
import threading
import logging
# import json
@@ -138,7 +139,7 @@ class ApiServer(RPC):
Starts TradeThread in bot if stopped.
"""
msg = self._rpc_start()
return jsonify(msg)
return json.dumps(msg)
def stop(self):
"""
@@ -147,4 +148,4 @@ class ApiServer(RPC):
Stops TradeThread in bot if running
"""
msg = self._rpc_stop()
return jsonify(msg)
return json.dumps(msg)