Skip to content

Commit

Permalink
✅ Unit Test for cornix type order to be parsed
Browse files Browse the repository at this point in the history
  • Loading branch information
mraniki committed Oct 10, 2023
1 parent f7d214f commit 05ecc22
Showing 1 changed file with 29 additions and 0 deletions.
29 changes: 29 additions & 0 deletions tests/test_unit.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"""
Expand Down Expand Up @@ -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

Check notice

Code scanning / Bandit

Use of assert detected. The enclosed code will be removed when compiling to optimised byte code. Note test

Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.

0 comments on commit 05ecc22

Please sign in to comment.