refactor(V2): bybit client da pybit a httpx puro (parità V1)
This commit is contained in:
@@ -1,21 +1,18 @@
|
||||
from __future__ import annotations
|
||||
|
||||
from unittest.mock import MagicMock
|
||||
|
||||
import pytest
|
||||
from cerbero_mcp.exchanges.bybit.client import BybitClient
|
||||
|
||||
|
||||
@pytest.fixture
|
||||
def mock_http():
|
||||
return MagicMock(name="pybit_HTTP")
|
||||
def client():
|
||||
"""BybitClient con base_url testnet e AsyncClient interno.
|
||||
|
||||
|
||||
@pytest.fixture
|
||||
def client(mock_http):
|
||||
pytest-httpx intercetta le chiamate dell'AsyncClient httpx creato dal
|
||||
costruttore (auto-mock), quindi non serve injection esplicita.
|
||||
"""
|
||||
return BybitClient(
|
||||
api_key="test_key",
|
||||
api_secret="test_secret",
|
||||
testnet=True,
|
||||
http=mock_http,
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user