mirror of
https://github.com/freqtrade/freqtrade.git
synced 2025-11-29 16:43:06 +00:00
use inmemory db for tests
This commit is contained in:
5
main.py
5
main.py
@@ -230,17 +230,18 @@ def create_trade(stake_amount: float, _exchange: exchange.Exchange) -> Optional[
|
||||
is_open=True)
|
||||
|
||||
|
||||
def init(config: dict) -> None:
|
||||
def init(config: dict, db_url: Optional[str]=None) -> None:
|
||||
"""
|
||||
Initializes all modules and updates the config
|
||||
:param config: config as dict
|
||||
:param db_url: database connector string for sqlalchemy (Optional)
|
||||
:return: None
|
||||
"""
|
||||
global _conf
|
||||
|
||||
# Initialize all modules
|
||||
telegram.init(config)
|
||||
persistence.init(config)
|
||||
persistence.init(config, db_url)
|
||||
exchange.init(config)
|
||||
_conf.update(config)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user