diff options
Diffstat (limited to 'shared/tests')
| -rw-r--r-- | shared/tests/test_models.py | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/shared/tests/test_models.py b/shared/tests/test_models.py index b23d71d..e3b9f12 100644 --- a/shared/tests/test_models.py +++ b/shared/tests/test_models.py @@ -99,8 +99,12 @@ def test_signal_conviction_default(): from shared.models import Signal, OrderSide signal = Signal( - strategy="rsi", symbol="BTCUSDT", side=OrderSide.BUY, - price=Decimal("50000"), quantity=Decimal("0.01"), reason="test", + strategy="rsi", + symbol="BTCUSDT", + side=OrderSide.BUY, + price=Decimal("50000"), + quantity=Decimal("0.01"), + reason="test", ) assert signal.conviction == 1.0 assert signal.stop_loss is None @@ -112,8 +116,12 @@ def test_signal_with_stops(): from shared.models import Signal, OrderSide signal = Signal( - strategy="rsi", symbol="BTCUSDT", side=OrderSide.BUY, - price=Decimal("50000"), quantity=Decimal("0.01"), reason="test", + strategy="rsi", + symbol="BTCUSDT", + side=OrderSide.BUY, + price=Decimal("50000"), + quantity=Decimal("0.01"), + reason="test", conviction=0.8, stop_loss=Decimal("48000"), take_profit=Decimal("55000"), |
