@@ -26,14 +26,19 @@ def event_loop() -> Iterator[asyncio.AbstractEventLoop]:
26
26
27
27
base_url = os .environ .get ("TEST_API_BASE_URL" , "http://127.0.0.1:4010" )
28
28
29
+ api_key = "144c9defac04969c7bfad8efaa8ea194"
30
+
31
+
29
32
30
33
@pytest .fixture (scope = "session" )
31
34
def client (request : FixtureRequest ) -> Iterator [Cloudflare ]:
32
35
strict = getattr (request , "param" , True )
33
36
if not isinstance (strict , bool ):
34
37
raise TypeError (f"Unexpected fixture parameter type { type (strict )} , expected { bool } " )
35
38
36
- with Cloudflare (base_url = base_url , _strict_response_validation = strict ) as client :
39
+ with Cloudflare (
40
+ base_url = base_url , api_key = api_key , api_email = api_email , _strict_response_validation = strict
41
+ ) as client :
37
42
yield client
38
43
39
44
@@ -43,5 +48,7 @@ async def async_client(request: FixtureRequest) -> AsyncIterator[AsyncCloudflare
43
48
if not isinstance (strict , bool ):
44
49
raise TypeError (f"Unexpected fixture parameter type { type (strict )} , expected { bool } " )
45
50
46
- async with AsyncCloudflare (base_url = base_url , _strict_response_validation = strict ) as client :
51
+ async with AsyncCloudflare (
52
+ base_url = base_url , api_key = api_key , api_email = api_email , _strict_response_validation = strict
53
+ ) as client :
47
54
yield client
0 commit comments