test cloned, separate tests for worker and freqtrade states
This commit is contained in:
parent
7251e5bd62
commit
62141d3d27
@ -82,7 +82,17 @@ def patch_RPCManager(mocker) -> MagicMock:
|
|||||||
|
|
||||||
# Unit tests
|
# Unit tests
|
||||||
|
|
||||||
def test_freqtradebot(mocker, default_conf, markets) -> None:
|
def test_freqtradebot_state(mocker, default_conf, markets) -> None:
|
||||||
|
mocker.patch('freqtrade.exchange.Exchange.markets', PropertyMock(return_value=markets))
|
||||||
|
freqtrade = get_patched_freqtradebot(mocker, default_conf)
|
||||||
|
assert freqtrade.state is State.RUNNING
|
||||||
|
|
||||||
|
default_conf.pop('initial_state')
|
||||||
|
freqtrade = FreqtradeBot(config=default_conf)
|
||||||
|
assert freqtrade.state is State.STOPPED
|
||||||
|
|
||||||
|
|
||||||
|
def test_worker_state(mocker, default_conf, markets) -> None:
|
||||||
mocker.patch('freqtrade.exchange.Exchange.markets', PropertyMock(return_value=markets))
|
mocker.patch('freqtrade.exchange.Exchange.markets', PropertyMock(return_value=markets))
|
||||||
worker = get_patched_worker(mocker, default_conf)
|
worker = get_patched_worker(mocker, default_conf)
|
||||||
assert worker.state is State.RUNNING
|
assert worker.state is State.RUNNING
|
||||||
|
Loading…
Reference in New Issue
Block a user