diff --git a/freqtrade/state.py b/freqtrade/state.py new file mode 100644 index 000000000..aaa5b4765 --- /dev/null +++ b/freqtrade/state.py @@ -0,0 +1,14 @@ +# pragma pylint: disable=too-few-public-methods + +""" +Bot state constant +""" +import enum + + +class State(enum.Enum): + """ + Bot running states + """ + RUNNING = 0 + STOPPED = 1 diff --git a/freqtrade/tests/test_state.py b/freqtrade/tests/test_state.py new file mode 100644 index 000000000..51fa06cc2 --- /dev/null +++ b/freqtrade/tests/test_state.py @@ -0,0 +1,14 @@ +""" +Unit test file for constants.py +""" + +from freqtrade.state import State + + +def test_state_object() -> None: + """ + Test the State object has the mandatory states + :return: None + """ + assert hasattr(State, 'RUNNING') + assert hasattr(State, 'STOPPED')