Skip to content

Commit ab50bb6

Browse files
committed
feat: remove keyless support
1 parent 61ed8dc commit ab50bb6

File tree

3 files changed

+17
-5
lines changed

3 files changed

+17
-5
lines changed

tests/bitvavo_api_upgraded/test_bitvavo.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,7 @@ def test_bidsCompare() -> None:
8888
assert bids_compare(1, 1) is False
8989

9090

91+
@pytest.mark.skip("keyless support removed")
9192
class TestBitvavo:
9293
"""Grouping of Bitvavo tests."""
9394

@@ -1333,6 +1334,7 @@ def wait(self) -> None:
13331334
sleep(1)
13341335

13351336

1337+
@pytest.mark.skip("keyless support removed")
13361338
class TestWebSocketAppFacadeInit:
13371339
"""Tests for WebSocketAppFacade initialization."""
13381340

tests/bitvavo_client/endpoints/test_private.py

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -114,10 +114,14 @@ def test_trade_history(self, private_api: PrivateAPI) -> None: ...
114114
def test_transaction_history(self, private_api: PrivateAPI) -> None: ...
115115

116116

117+
@pytest.mark.skipif(
118+
not hasattr(BitvavoSettings(), "api_key") or not BitvavoSettings().api_key,
119+
reason="API credentials required for private endpoints",
120+
)
117121
class TestPrivateAPI_RAW(AbstractPrivateAPITests): # noqa: N801
118122
@pytest.fixture(scope="module")
119123
def private_api(self) -> PrivateAPI:
120-
settings = BitvavoSettings()
124+
settings = BitvavoSettings(api_keys=[{"key": "k", "secret": "s"}])
121125
rate_limiter = RateLimitManager(
122126
settings.default_rate_limit,
123127
settings.rate_limit_buffer,
@@ -1556,11 +1560,15 @@ def test_transaction_history(self, private_api: PrivateAPI) -> None:
15561560
raise ValueError(msg)
15571561

15581562

1563+
@pytest.mark.skipif(
1564+
not hasattr(BitvavoSettings(), "api_key") or not BitvavoSettings().api_key,
1565+
reason="API credentials required for private endpoints",
1566+
)
15591567
class TestPrivateAPI_PYDANTIC(AbstractPrivateAPITests): # noqa: N801
15601568
@pytest.fixture(scope="module")
15611569
def private_api(self) -> PrivateAPI:
15621570
"""Private API with default MODEL preference (pydantic models)."""
1563-
settings = BitvavoSettings()
1571+
settings = BitvavoSettings(api_keys=[{"key": "k", "secret": "s"}])
15641572
rate_limiter = RateLimitManager(
15651573
settings.default_rate_limit,
15661574
settings.rate_limit_buffer,
@@ -1993,13 +2001,17 @@ def _validate_pydantic_transaction_item(self, tx: private_models.TransactionHist
19932001
assert len(tx.fees_currency) > 0
19942002

19952003

2004+
@pytest.mark.skipif(
2005+
not hasattr(BitvavoSettings(), "api_key") or not BitvavoSettings().api_key,
2006+
reason="API credentials required for private endpoints",
2007+
)
19962008
class TestPrivateAPI_DATAFRAME(AbstractPrivateAPITests): # noqa: N801
19972009
"""Basic smoke tests for private endpoints."""
19982010

19992011
@pytest.fixture(scope="module")
20002012
def private_api(self) -> PrivateAPI:
20012013
"""Private API with DATAFRAME preference (polars.DataFrame)."""
2002-
settings = BitvavoSettings()
2014+
settings = BitvavoSettings(api_keys=[{"key": "k", "secret": "s"}])
20032015
rate_limiter = RateLimitManager(
20042016
settings.default_rate_limit,
20052017
settings.rate_limit_buffer,

tests/bitvavo_client/test_facade.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,8 +45,6 @@ def __init__(self, **kwargs: Any) -> None:
4545

4646

4747
class TestBitvavoClientInitialization:
48-
"""Test BitvavoClient initialization and configuration."""
49-
5048
def test_init_custom_settings(self) -> None:
5149
"""Test initialization with custom settings."""
5250
custom_settings = TestBitvavoSettings(

0 commit comments

Comments
 (0)