Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 4 additions & 5 deletions src/lnmarkets_sdk/rest/v3/tests/test_integration.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

import asyncio
import os
from typing import Any

import pytest
from dotenv import load_dotenv
Expand Down Expand Up @@ -90,7 +91,7 @@ async def test_ping(self):

async def test_time(self):
async with LNMClient(create_public_config()) as client:
result = await client.request("GET", "/time")
result: Any = await client.request("GET", "/time")
assert "time" in result
assert isinstance(result["time"], str)

Expand Down Expand Up @@ -451,8 +452,7 @@ async def test_get_closed_trades(self):
assert closed_trade.closed is True
assert closed_trade.open is False
assert closed_trade.running is False
if closed_trade.closed_at is not None:
assert isinstance(closed_trade.closed_at, str)
assert isinstance(closed_trade.closed_at, str)

@pytest.mark.skipif(
not os.environ.get("TESTNET4_API_KEY"),
Expand Down Expand Up @@ -515,8 +515,7 @@ async def test_close_trade(self):
assert closed.closed is True
assert closed.open is False
assert closed.running is False
if closed.closed_at is not None:
assert isinstance(closed.closed_at, str)
assert isinstance(closed.closed_at, str)
except Exception as e:
# May fail if no running trades or insufficient margin
assert len(str(e)) > 0
Expand Down
Loading