From 05ecc229c414a0e373e003ef089328a013a24b53 Mon Sep 17 00:00:00 2001 From: mraniki <8766259+mraniki@users.noreply.github.com> Date: Tue, 10 Oct 2023 20:12:55 +0200 Subject: [PATCH] =?UTF-8?q?=E2=9C=85=20Unit=20Test=20for=20cornix=20type?= =?UTF-8?q?=20order=20to=20be=20parsed?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- tests/test_unit.py | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) diff --git a/tests/test_unit.py b/tests/test_unit.py index 1b4b2425..ca22c03f 100644 --- a/tests/test_unit.py +++ b/tests/test_unit.py @@ -33,6 +33,28 @@ def short_order(): return "Buy EURUSD" +@pytest.fixture +def order_2(): + """return order 2""" + return """ + 📊 FUTURES Exchanges: Binance, ByBit USDT + + #AAVEUSDT + + 🟢LONG ENTRY :- 65.20 - 63.70 + + Leverage: Cross (2X) + + 👇TAKE PROFIT + + 1) 65.70 + 2) 66.20 + 3) 66.70 + + Stop Loss : - 62.00 +""" + + @pytest.fixture def result_order(): """return standard expected results""" @@ -217,3 +239,10 @@ async def test_mapping_order(fmo, crypto_short_order, result_crypto_order): assert settings.instrument_mapping is True assert result["instrument"] == result_crypto_order["instrument"] assert type(result["timestamp"] is datetime) + + +@pytest.mark.asyncio +async def test_identify_order2(fmo, order_2): + """Identify Testing""" + result = await fmo.identify_order(order_2) + assert result is not None