22
33import pytest
44
5- from ..custom_api import MongodbUtilsV1API
6- from ..api import MongodbV1API
7-
8-
9- class _DummyClient :
10- pass
5+ from scaleway .mongodb .v1 .custom_api import MongodbUtilsV1API
6+ from scaleway .mongodb .v1 .api import MongodbV1API
7+ from tests .utils import initialize_client_test
118
129
1310@pytest .mark .parametrize ("method_name" , ["create_snapshot" , "update_snapshot" ])
@@ -22,7 +19,7 @@ def dummy(self, **kwargs): # type: ignore[no-untyped-def]
2219
2320 monkeypatch .setattr (MongodbV1API , method_name , dummy , raising = True )
2421
25- api = MongodbUtilsV1API (client = _DummyClient (), bypass_validation = True )
22+ api = MongodbUtilsV1API (client = initialize_client_test (), bypass_validation = True )
2623
2724 # Build naive datetime without triggering DTZ001 (construct aware then strip tz)
2825 naive_dt = datetime (2030 , 1 , 1 , 12 , 0 , 0 , tzinfo = timezone .utc ).replace (tzinfo = None )
@@ -51,7 +48,7 @@ def dummy(self, **kwargs): # type: ignore[no-untyped-def]
5148
5249 monkeypatch .setattr (MongodbV1API , method_name , dummy , raising = True )
5350
54- api = MongodbUtilsV1API (client = _DummyClient (), bypass_validation = True )
51+ api = MongodbUtilsV1API (client = initialize_client_test (), bypass_validation = True )
5552
5653 aware_dt = datetime (2030 , 1 , 1 , 12 , 0 , 0 , tzinfo = timezone .utc )
5754
0 commit comments