@@ -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+ )
117121class 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+ )
15591567class 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+ )
19962008class 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 ,
0 commit comments