mirror of
https://github.com/cloudflare/cloudflare-python.git
synced 2026-01-16 23:01:03 +00:00
chore: rebuild project due to codegen change (#2165)
This commit is contained in:
parent
2b267cec1b
commit
877e8c2484
Notes:
stainless-bot
2024-11-18 10:55:56 +00:00
Stainless-Generated-Commit: 63d2a65dbb
162 changed files with 4534 additions and 15814 deletions
|
|
@ -27,11 +27,7 @@ class TestMembers:
|
|||
member = client.accounts.members.create(
|
||||
account_id="eb78d65290b24279ba6f44721b3ea3c4",
|
||||
email="user@example.com",
|
||||
roles=[
|
||||
"3536bcfad5faccb999b47003c79917fb",
|
||||
"3536bcfad5faccb999b47003c79917fb",
|
||||
"3536bcfad5faccb999b47003c79917fb",
|
||||
],
|
||||
roles=["3536bcfad5faccb999b47003c79917fb"],
|
||||
)
|
||||
assert_matches_type(Optional[Member], member, path=["response"])
|
||||
|
||||
|
|
@ -41,11 +37,7 @@ class TestMembers:
|
|||
member = client.accounts.members.create(
|
||||
account_id="eb78d65290b24279ba6f44721b3ea3c4",
|
||||
email="user@example.com",
|
||||
roles=[
|
||||
"3536bcfad5faccb999b47003c79917fb",
|
||||
"3536bcfad5faccb999b47003c79917fb",
|
||||
"3536bcfad5faccb999b47003c79917fb",
|
||||
],
|
||||
roles=["3536bcfad5faccb999b47003c79917fb"],
|
||||
status="accepted",
|
||||
)
|
||||
assert_matches_type(Optional[Member], member, path=["response"])
|
||||
|
|
@ -56,11 +48,7 @@ class TestMembers:
|
|||
response = client.accounts.members.with_raw_response.create(
|
||||
account_id="eb78d65290b24279ba6f44721b3ea3c4",
|
||||
email="user@example.com",
|
||||
roles=[
|
||||
"3536bcfad5faccb999b47003c79917fb",
|
||||
"3536bcfad5faccb999b47003c79917fb",
|
||||
"3536bcfad5faccb999b47003c79917fb",
|
||||
],
|
||||
roles=["3536bcfad5faccb999b47003c79917fb"],
|
||||
)
|
||||
|
||||
assert response.is_closed is True
|
||||
|
|
@ -74,11 +62,7 @@ class TestMembers:
|
|||
with client.accounts.members.with_streaming_response.create(
|
||||
account_id="eb78d65290b24279ba6f44721b3ea3c4",
|
||||
email="user@example.com",
|
||||
roles=[
|
||||
"3536bcfad5faccb999b47003c79917fb",
|
||||
"3536bcfad5faccb999b47003c79917fb",
|
||||
"3536bcfad5faccb999b47003c79917fb",
|
||||
],
|
||||
roles=["3536bcfad5faccb999b47003c79917fb"],
|
||||
) as response:
|
||||
assert not response.is_closed
|
||||
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
|
||||
|
|
@ -95,11 +79,7 @@ class TestMembers:
|
|||
client.accounts.members.with_raw_response.create(
|
||||
account_id="",
|
||||
email="user@example.com",
|
||||
roles=[
|
||||
"3536bcfad5faccb999b47003c79917fb",
|
||||
"3536bcfad5faccb999b47003c79917fb",
|
||||
"3536bcfad5faccb999b47003c79917fb",
|
||||
],
|
||||
roles=["3536bcfad5faccb999b47003c79917fb"],
|
||||
)
|
||||
|
||||
@pytest.mark.skip(reason="HTTP 422 error from prism")
|
||||
|
|
@ -115,36 +95,8 @@ class TestMembers:
|
|||
{"id": "c8fed203ed3043cba015a93ad1616f1f"},
|
||||
{"id": "82e64a83756745bbbb1c9c2701bf816b"},
|
||||
],
|
||||
"resource_groups": [
|
||||
{"id": "6d7f2f5f5b1d4a0e9081fdc98d432fd1"},
|
||||
{"id": "6d7f2f5f5b1d4a0e9081fdc98d432fd1"},
|
||||
{"id": "6d7f2f5f5b1d4a0e9081fdc98d432fd1"},
|
||||
],
|
||||
},
|
||||
{
|
||||
"access": "allow",
|
||||
"permission_groups": [
|
||||
{"id": "c8fed203ed3043cba015a93ad1616f1f"},
|
||||
{"id": "82e64a83756745bbbb1c9c2701bf816b"},
|
||||
],
|
||||
"resource_groups": [
|
||||
{"id": "6d7f2f5f5b1d4a0e9081fdc98d432fd1"},
|
||||
{"id": "6d7f2f5f5b1d4a0e9081fdc98d432fd1"},
|
||||
{"id": "6d7f2f5f5b1d4a0e9081fdc98d432fd1"},
|
||||
],
|
||||
},
|
||||
{
|
||||
"access": "allow",
|
||||
"permission_groups": [
|
||||
{"id": "c8fed203ed3043cba015a93ad1616f1f"},
|
||||
{"id": "82e64a83756745bbbb1c9c2701bf816b"},
|
||||
],
|
||||
"resource_groups": [
|
||||
{"id": "6d7f2f5f5b1d4a0e9081fdc98d432fd1"},
|
||||
{"id": "6d7f2f5f5b1d4a0e9081fdc98d432fd1"},
|
||||
{"id": "6d7f2f5f5b1d4a0e9081fdc98d432fd1"},
|
||||
],
|
||||
},
|
||||
"resource_groups": [{"id": "6d7f2f5f5b1d4a0e9081fdc98d432fd1"}],
|
||||
}
|
||||
],
|
||||
)
|
||||
assert_matches_type(Optional[Member], member, path=["response"])
|
||||
|
|
@ -162,36 +114,8 @@ class TestMembers:
|
|||
{"id": "c8fed203ed3043cba015a93ad1616f1f"},
|
||||
{"id": "82e64a83756745bbbb1c9c2701bf816b"},
|
||||
],
|
||||
"resource_groups": [
|
||||
{"id": "6d7f2f5f5b1d4a0e9081fdc98d432fd1"},
|
||||
{"id": "6d7f2f5f5b1d4a0e9081fdc98d432fd1"},
|
||||
{"id": "6d7f2f5f5b1d4a0e9081fdc98d432fd1"},
|
||||
],
|
||||
},
|
||||
{
|
||||
"access": "allow",
|
||||
"permission_groups": [
|
||||
{"id": "c8fed203ed3043cba015a93ad1616f1f"},
|
||||
{"id": "82e64a83756745bbbb1c9c2701bf816b"},
|
||||
],
|
||||
"resource_groups": [
|
||||
{"id": "6d7f2f5f5b1d4a0e9081fdc98d432fd1"},
|
||||
{"id": "6d7f2f5f5b1d4a0e9081fdc98d432fd1"},
|
||||
{"id": "6d7f2f5f5b1d4a0e9081fdc98d432fd1"},
|
||||
],
|
||||
},
|
||||
{
|
||||
"access": "allow",
|
||||
"permission_groups": [
|
||||
{"id": "c8fed203ed3043cba015a93ad1616f1f"},
|
||||
{"id": "82e64a83756745bbbb1c9c2701bf816b"},
|
||||
],
|
||||
"resource_groups": [
|
||||
{"id": "6d7f2f5f5b1d4a0e9081fdc98d432fd1"},
|
||||
{"id": "6d7f2f5f5b1d4a0e9081fdc98d432fd1"},
|
||||
{"id": "6d7f2f5f5b1d4a0e9081fdc98d432fd1"},
|
||||
],
|
||||
},
|
||||
"resource_groups": [{"id": "6d7f2f5f5b1d4a0e9081fdc98d432fd1"}],
|
||||
}
|
||||
],
|
||||
status="accepted",
|
||||
)
|
||||
|
|
@ -210,36 +134,8 @@ class TestMembers:
|
|||
{"id": "c8fed203ed3043cba015a93ad1616f1f"},
|
||||
{"id": "82e64a83756745bbbb1c9c2701bf816b"},
|
||||
],
|
||||
"resource_groups": [
|
||||
{"id": "6d7f2f5f5b1d4a0e9081fdc98d432fd1"},
|
||||
{"id": "6d7f2f5f5b1d4a0e9081fdc98d432fd1"},
|
||||
{"id": "6d7f2f5f5b1d4a0e9081fdc98d432fd1"},
|
||||
],
|
||||
},
|
||||
{
|
||||
"access": "allow",
|
||||
"permission_groups": [
|
||||
{"id": "c8fed203ed3043cba015a93ad1616f1f"},
|
||||
{"id": "82e64a83756745bbbb1c9c2701bf816b"},
|
||||
],
|
||||
"resource_groups": [
|
||||
{"id": "6d7f2f5f5b1d4a0e9081fdc98d432fd1"},
|
||||
{"id": "6d7f2f5f5b1d4a0e9081fdc98d432fd1"},
|
||||
{"id": "6d7f2f5f5b1d4a0e9081fdc98d432fd1"},
|
||||
],
|
||||
},
|
||||
{
|
||||
"access": "allow",
|
||||
"permission_groups": [
|
||||
{"id": "c8fed203ed3043cba015a93ad1616f1f"},
|
||||
{"id": "82e64a83756745bbbb1c9c2701bf816b"},
|
||||
],
|
||||
"resource_groups": [
|
||||
{"id": "6d7f2f5f5b1d4a0e9081fdc98d432fd1"},
|
||||
{"id": "6d7f2f5f5b1d4a0e9081fdc98d432fd1"},
|
||||
{"id": "6d7f2f5f5b1d4a0e9081fdc98d432fd1"},
|
||||
],
|
||||
},
|
||||
"resource_groups": [{"id": "6d7f2f5f5b1d4a0e9081fdc98d432fd1"}],
|
||||
}
|
||||
],
|
||||
)
|
||||
|
||||
|
|
@ -261,36 +157,8 @@ class TestMembers:
|
|||
{"id": "c8fed203ed3043cba015a93ad1616f1f"},
|
||||
{"id": "82e64a83756745bbbb1c9c2701bf816b"},
|
||||
],
|
||||
"resource_groups": [
|
||||
{"id": "6d7f2f5f5b1d4a0e9081fdc98d432fd1"},
|
||||
{"id": "6d7f2f5f5b1d4a0e9081fdc98d432fd1"},
|
||||
{"id": "6d7f2f5f5b1d4a0e9081fdc98d432fd1"},
|
||||
],
|
||||
},
|
||||
{
|
||||
"access": "allow",
|
||||
"permission_groups": [
|
||||
{"id": "c8fed203ed3043cba015a93ad1616f1f"},
|
||||
{"id": "82e64a83756745bbbb1c9c2701bf816b"},
|
||||
],
|
||||
"resource_groups": [
|
||||
{"id": "6d7f2f5f5b1d4a0e9081fdc98d432fd1"},
|
||||
{"id": "6d7f2f5f5b1d4a0e9081fdc98d432fd1"},
|
||||
{"id": "6d7f2f5f5b1d4a0e9081fdc98d432fd1"},
|
||||
],
|
||||
},
|
||||
{
|
||||
"access": "allow",
|
||||
"permission_groups": [
|
||||
{"id": "c8fed203ed3043cba015a93ad1616f1f"},
|
||||
{"id": "82e64a83756745bbbb1c9c2701bf816b"},
|
||||
],
|
||||
"resource_groups": [
|
||||
{"id": "6d7f2f5f5b1d4a0e9081fdc98d432fd1"},
|
||||
{"id": "6d7f2f5f5b1d4a0e9081fdc98d432fd1"},
|
||||
{"id": "6d7f2f5f5b1d4a0e9081fdc98d432fd1"},
|
||||
],
|
||||
},
|
||||
"resource_groups": [{"id": "6d7f2f5f5b1d4a0e9081fdc98d432fd1"}],
|
||||
}
|
||||
],
|
||||
) as response:
|
||||
assert not response.is_closed
|
||||
|
|
@ -315,36 +183,8 @@ class TestMembers:
|
|||
{"id": "c8fed203ed3043cba015a93ad1616f1f"},
|
||||
{"id": "82e64a83756745bbbb1c9c2701bf816b"},
|
||||
],
|
||||
"resource_groups": [
|
||||
{"id": "6d7f2f5f5b1d4a0e9081fdc98d432fd1"},
|
||||
{"id": "6d7f2f5f5b1d4a0e9081fdc98d432fd1"},
|
||||
{"id": "6d7f2f5f5b1d4a0e9081fdc98d432fd1"},
|
||||
],
|
||||
},
|
||||
{
|
||||
"access": "allow",
|
||||
"permission_groups": [
|
||||
{"id": "c8fed203ed3043cba015a93ad1616f1f"},
|
||||
{"id": "82e64a83756745bbbb1c9c2701bf816b"},
|
||||
],
|
||||
"resource_groups": [
|
||||
{"id": "6d7f2f5f5b1d4a0e9081fdc98d432fd1"},
|
||||
{"id": "6d7f2f5f5b1d4a0e9081fdc98d432fd1"},
|
||||
{"id": "6d7f2f5f5b1d4a0e9081fdc98d432fd1"},
|
||||
],
|
||||
},
|
||||
{
|
||||
"access": "allow",
|
||||
"permission_groups": [
|
||||
{"id": "c8fed203ed3043cba015a93ad1616f1f"},
|
||||
{"id": "82e64a83756745bbbb1c9c2701bf816b"},
|
||||
],
|
||||
"resource_groups": [
|
||||
{"id": "6d7f2f5f5b1d4a0e9081fdc98d432fd1"},
|
||||
{"id": "6d7f2f5f5b1d4a0e9081fdc98d432fd1"},
|
||||
{"id": "6d7f2f5f5b1d4a0e9081fdc98d432fd1"},
|
||||
],
|
||||
},
|
||||
"resource_groups": [{"id": "6d7f2f5f5b1d4a0e9081fdc98d432fd1"}],
|
||||
}
|
||||
],
|
||||
)
|
||||
|
||||
|
|
@ -363,11 +203,7 @@ class TestMembers:
|
|||
member = client.accounts.members.update(
|
||||
member_id="4536bcfad5faccb111b47003c79917fa",
|
||||
account_id="eb78d65290b24279ba6f44721b3ea3c4",
|
||||
roles=[
|
||||
{"id": "3536bcfad5faccb999b47003c79917fb"},
|
||||
{"id": "3536bcfad5faccb999b47003c79917fb"},
|
||||
{"id": "3536bcfad5faccb999b47003c79917fb"},
|
||||
],
|
||||
roles=[{"id": "3536bcfad5faccb999b47003c79917fb"}],
|
||||
)
|
||||
assert_matches_type(Optional[Member], member, path=["response"])
|
||||
|
||||
|
|
@ -427,36 +263,8 @@ class TestMembers:
|
|||
{"id": "c8fed203ed3043cba015a93ad1616f1f"},
|
||||
{"id": "82e64a83756745bbbb1c9c2701bf816b"},
|
||||
],
|
||||
"resource_groups": [
|
||||
{"id": "6d7f2f5f5b1d4a0e9081fdc98d432fd1"},
|
||||
{"id": "6d7f2f5f5b1d4a0e9081fdc98d432fd1"},
|
||||
{"id": "6d7f2f5f5b1d4a0e9081fdc98d432fd1"},
|
||||
],
|
||||
},
|
||||
{
|
||||
"access": "allow",
|
||||
"permission_groups": [
|
||||
{"id": "c8fed203ed3043cba015a93ad1616f1f"},
|
||||
{"id": "82e64a83756745bbbb1c9c2701bf816b"},
|
||||
],
|
||||
"resource_groups": [
|
||||
{"id": "6d7f2f5f5b1d4a0e9081fdc98d432fd1"},
|
||||
{"id": "6d7f2f5f5b1d4a0e9081fdc98d432fd1"},
|
||||
{"id": "6d7f2f5f5b1d4a0e9081fdc98d432fd1"},
|
||||
],
|
||||
},
|
||||
{
|
||||
"access": "allow",
|
||||
"permission_groups": [
|
||||
{"id": "c8fed203ed3043cba015a93ad1616f1f"},
|
||||
{"id": "82e64a83756745bbbb1c9c2701bf816b"},
|
||||
],
|
||||
"resource_groups": [
|
||||
{"id": "6d7f2f5f5b1d4a0e9081fdc98d432fd1"},
|
||||
{"id": "6d7f2f5f5b1d4a0e9081fdc98d432fd1"},
|
||||
{"id": "6d7f2f5f5b1d4a0e9081fdc98d432fd1"},
|
||||
],
|
||||
},
|
||||
"resource_groups": [{"id": "6d7f2f5f5b1d4a0e9081fdc98d432fd1"}],
|
||||
}
|
||||
],
|
||||
)
|
||||
assert_matches_type(Optional[Member], member, path=["response"])
|
||||
|
|
@ -474,36 +282,8 @@ class TestMembers:
|
|||
{"id": "c8fed203ed3043cba015a93ad1616f1f"},
|
||||
{"id": "82e64a83756745bbbb1c9c2701bf816b"},
|
||||
],
|
||||
"resource_groups": [
|
||||
{"id": "6d7f2f5f5b1d4a0e9081fdc98d432fd1"},
|
||||
{"id": "6d7f2f5f5b1d4a0e9081fdc98d432fd1"},
|
||||
{"id": "6d7f2f5f5b1d4a0e9081fdc98d432fd1"},
|
||||
],
|
||||
},
|
||||
{
|
||||
"access": "allow",
|
||||
"permission_groups": [
|
||||
{"id": "c8fed203ed3043cba015a93ad1616f1f"},
|
||||
{"id": "82e64a83756745bbbb1c9c2701bf816b"},
|
||||
],
|
||||
"resource_groups": [
|
||||
{"id": "6d7f2f5f5b1d4a0e9081fdc98d432fd1"},
|
||||
{"id": "6d7f2f5f5b1d4a0e9081fdc98d432fd1"},
|
||||
{"id": "6d7f2f5f5b1d4a0e9081fdc98d432fd1"},
|
||||
],
|
||||
},
|
||||
{
|
||||
"access": "allow",
|
||||
"permission_groups": [
|
||||
{"id": "c8fed203ed3043cba015a93ad1616f1f"},
|
||||
{"id": "82e64a83756745bbbb1c9c2701bf816b"},
|
||||
],
|
||||
"resource_groups": [
|
||||
{"id": "6d7f2f5f5b1d4a0e9081fdc98d432fd1"},
|
||||
{"id": "6d7f2f5f5b1d4a0e9081fdc98d432fd1"},
|
||||
{"id": "6d7f2f5f5b1d4a0e9081fdc98d432fd1"},
|
||||
],
|
||||
},
|
||||
"resource_groups": [{"id": "6d7f2f5f5b1d4a0e9081fdc98d432fd1"}],
|
||||
}
|
||||
],
|
||||
)
|
||||
|
||||
|
|
@ -525,36 +305,8 @@ class TestMembers:
|
|||
{"id": "c8fed203ed3043cba015a93ad1616f1f"},
|
||||
{"id": "82e64a83756745bbbb1c9c2701bf816b"},
|
||||
],
|
||||
"resource_groups": [
|
||||
{"id": "6d7f2f5f5b1d4a0e9081fdc98d432fd1"},
|
||||
{"id": "6d7f2f5f5b1d4a0e9081fdc98d432fd1"},
|
||||
{"id": "6d7f2f5f5b1d4a0e9081fdc98d432fd1"},
|
||||
],
|
||||
},
|
||||
{
|
||||
"access": "allow",
|
||||
"permission_groups": [
|
||||
{"id": "c8fed203ed3043cba015a93ad1616f1f"},
|
||||
{"id": "82e64a83756745bbbb1c9c2701bf816b"},
|
||||
],
|
||||
"resource_groups": [
|
||||
{"id": "6d7f2f5f5b1d4a0e9081fdc98d432fd1"},
|
||||
{"id": "6d7f2f5f5b1d4a0e9081fdc98d432fd1"},
|
||||
{"id": "6d7f2f5f5b1d4a0e9081fdc98d432fd1"},
|
||||
],
|
||||
},
|
||||
{
|
||||
"access": "allow",
|
||||
"permission_groups": [
|
||||
{"id": "c8fed203ed3043cba015a93ad1616f1f"},
|
||||
{"id": "82e64a83756745bbbb1c9c2701bf816b"},
|
||||
],
|
||||
"resource_groups": [
|
||||
{"id": "6d7f2f5f5b1d4a0e9081fdc98d432fd1"},
|
||||
{"id": "6d7f2f5f5b1d4a0e9081fdc98d432fd1"},
|
||||
{"id": "6d7f2f5f5b1d4a0e9081fdc98d432fd1"},
|
||||
],
|
||||
},
|
||||
"resource_groups": [{"id": "6d7f2f5f5b1d4a0e9081fdc98d432fd1"}],
|
||||
}
|
||||
],
|
||||
) as response:
|
||||
assert not response.is_closed
|
||||
|
|
@ -579,36 +331,8 @@ class TestMembers:
|
|||
{"id": "c8fed203ed3043cba015a93ad1616f1f"},
|
||||
{"id": "82e64a83756745bbbb1c9c2701bf816b"},
|
||||
],
|
||||
"resource_groups": [
|
||||
{"id": "6d7f2f5f5b1d4a0e9081fdc98d432fd1"},
|
||||
{"id": "6d7f2f5f5b1d4a0e9081fdc98d432fd1"},
|
||||
{"id": "6d7f2f5f5b1d4a0e9081fdc98d432fd1"},
|
||||
],
|
||||
},
|
||||
{
|
||||
"access": "allow",
|
||||
"permission_groups": [
|
||||
{"id": "c8fed203ed3043cba015a93ad1616f1f"},
|
||||
{"id": "82e64a83756745bbbb1c9c2701bf816b"},
|
||||
],
|
||||
"resource_groups": [
|
||||
{"id": "6d7f2f5f5b1d4a0e9081fdc98d432fd1"},
|
||||
{"id": "6d7f2f5f5b1d4a0e9081fdc98d432fd1"},
|
||||
{"id": "6d7f2f5f5b1d4a0e9081fdc98d432fd1"},
|
||||
],
|
||||
},
|
||||
{
|
||||
"access": "allow",
|
||||
"permission_groups": [
|
||||
{"id": "c8fed203ed3043cba015a93ad1616f1f"},
|
||||
{"id": "82e64a83756745bbbb1c9c2701bf816b"},
|
||||
],
|
||||
"resource_groups": [
|
||||
{"id": "6d7f2f5f5b1d4a0e9081fdc98d432fd1"},
|
||||
{"id": "6d7f2f5f5b1d4a0e9081fdc98d432fd1"},
|
||||
{"id": "6d7f2f5f5b1d4a0e9081fdc98d432fd1"},
|
||||
],
|
||||
},
|
||||
"resource_groups": [{"id": "6d7f2f5f5b1d4a0e9081fdc98d432fd1"}],
|
||||
}
|
||||
],
|
||||
)
|
||||
|
||||
|
|
@ -623,36 +347,8 @@ class TestMembers:
|
|||
{"id": "c8fed203ed3043cba015a93ad1616f1f"},
|
||||
{"id": "82e64a83756745bbbb1c9c2701bf816b"},
|
||||
],
|
||||
"resource_groups": [
|
||||
{"id": "6d7f2f5f5b1d4a0e9081fdc98d432fd1"},
|
||||
{"id": "6d7f2f5f5b1d4a0e9081fdc98d432fd1"},
|
||||
{"id": "6d7f2f5f5b1d4a0e9081fdc98d432fd1"},
|
||||
],
|
||||
},
|
||||
{
|
||||
"access": "allow",
|
||||
"permission_groups": [
|
||||
{"id": "c8fed203ed3043cba015a93ad1616f1f"},
|
||||
{"id": "82e64a83756745bbbb1c9c2701bf816b"},
|
||||
],
|
||||
"resource_groups": [
|
||||
{"id": "6d7f2f5f5b1d4a0e9081fdc98d432fd1"},
|
||||
{"id": "6d7f2f5f5b1d4a0e9081fdc98d432fd1"},
|
||||
{"id": "6d7f2f5f5b1d4a0e9081fdc98d432fd1"},
|
||||
],
|
||||
},
|
||||
{
|
||||
"access": "allow",
|
||||
"permission_groups": [
|
||||
{"id": "c8fed203ed3043cba015a93ad1616f1f"},
|
||||
{"id": "82e64a83756745bbbb1c9c2701bf816b"},
|
||||
],
|
||||
"resource_groups": [
|
||||
{"id": "6d7f2f5f5b1d4a0e9081fdc98d432fd1"},
|
||||
{"id": "6d7f2f5f5b1d4a0e9081fdc98d432fd1"},
|
||||
{"id": "6d7f2f5f5b1d4a0e9081fdc98d432fd1"},
|
||||
],
|
||||
},
|
||||
"resource_groups": [{"id": "6d7f2f5f5b1d4a0e9081fdc98d432fd1"}],
|
||||
}
|
||||
],
|
||||
)
|
||||
|
||||
|
|
@ -820,11 +516,7 @@ class TestAsyncMembers:
|
|||
member = await async_client.accounts.members.create(
|
||||
account_id="eb78d65290b24279ba6f44721b3ea3c4",
|
||||
email="user@example.com",
|
||||
roles=[
|
||||
"3536bcfad5faccb999b47003c79917fb",
|
||||
"3536bcfad5faccb999b47003c79917fb",
|
||||
"3536bcfad5faccb999b47003c79917fb",
|
||||
],
|
||||
roles=["3536bcfad5faccb999b47003c79917fb"],
|
||||
)
|
||||
assert_matches_type(Optional[Member], member, path=["response"])
|
||||
|
||||
|
|
@ -834,11 +526,7 @@ class TestAsyncMembers:
|
|||
member = await async_client.accounts.members.create(
|
||||
account_id="eb78d65290b24279ba6f44721b3ea3c4",
|
||||
email="user@example.com",
|
||||
roles=[
|
||||
"3536bcfad5faccb999b47003c79917fb",
|
||||
"3536bcfad5faccb999b47003c79917fb",
|
||||
"3536bcfad5faccb999b47003c79917fb",
|
||||
],
|
||||
roles=["3536bcfad5faccb999b47003c79917fb"],
|
||||
status="accepted",
|
||||
)
|
||||
assert_matches_type(Optional[Member], member, path=["response"])
|
||||
|
|
@ -849,11 +537,7 @@ class TestAsyncMembers:
|
|||
response = await async_client.accounts.members.with_raw_response.create(
|
||||
account_id="eb78d65290b24279ba6f44721b3ea3c4",
|
||||
email="user@example.com",
|
||||
roles=[
|
||||
"3536bcfad5faccb999b47003c79917fb",
|
||||
"3536bcfad5faccb999b47003c79917fb",
|
||||
"3536bcfad5faccb999b47003c79917fb",
|
||||
],
|
||||
roles=["3536bcfad5faccb999b47003c79917fb"],
|
||||
)
|
||||
|
||||
assert response.is_closed is True
|
||||
|
|
@ -867,11 +551,7 @@ class TestAsyncMembers:
|
|||
async with async_client.accounts.members.with_streaming_response.create(
|
||||
account_id="eb78d65290b24279ba6f44721b3ea3c4",
|
||||
email="user@example.com",
|
||||
roles=[
|
||||
"3536bcfad5faccb999b47003c79917fb",
|
||||
"3536bcfad5faccb999b47003c79917fb",
|
||||
"3536bcfad5faccb999b47003c79917fb",
|
||||
],
|
||||
roles=["3536bcfad5faccb999b47003c79917fb"],
|
||||
) as response:
|
||||
assert not response.is_closed
|
||||
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
|
||||
|
|
@ -888,11 +568,7 @@ class TestAsyncMembers:
|
|||
await async_client.accounts.members.with_raw_response.create(
|
||||
account_id="",
|
||||
email="user@example.com",
|
||||
roles=[
|
||||
"3536bcfad5faccb999b47003c79917fb",
|
||||
"3536bcfad5faccb999b47003c79917fb",
|
||||
"3536bcfad5faccb999b47003c79917fb",
|
||||
],
|
||||
roles=["3536bcfad5faccb999b47003c79917fb"],
|
||||
)
|
||||
|
||||
@pytest.mark.skip(reason="HTTP 422 error from prism")
|
||||
|
|
@ -908,36 +584,8 @@ class TestAsyncMembers:
|
|||
{"id": "c8fed203ed3043cba015a93ad1616f1f"},
|
||||
{"id": "82e64a83756745bbbb1c9c2701bf816b"},
|
||||
],
|
||||
"resource_groups": [
|
||||
{"id": "6d7f2f5f5b1d4a0e9081fdc98d432fd1"},
|
||||
{"id": "6d7f2f5f5b1d4a0e9081fdc98d432fd1"},
|
||||
{"id": "6d7f2f5f5b1d4a0e9081fdc98d432fd1"},
|
||||
],
|
||||
},
|
||||
{
|
||||
"access": "allow",
|
||||
"permission_groups": [
|
||||
{"id": "c8fed203ed3043cba015a93ad1616f1f"},
|
||||
{"id": "82e64a83756745bbbb1c9c2701bf816b"},
|
||||
],
|
||||
"resource_groups": [
|
||||
{"id": "6d7f2f5f5b1d4a0e9081fdc98d432fd1"},
|
||||
{"id": "6d7f2f5f5b1d4a0e9081fdc98d432fd1"},
|
||||
{"id": "6d7f2f5f5b1d4a0e9081fdc98d432fd1"},
|
||||
],
|
||||
},
|
||||
{
|
||||
"access": "allow",
|
||||
"permission_groups": [
|
||||
{"id": "c8fed203ed3043cba015a93ad1616f1f"},
|
||||
{"id": "82e64a83756745bbbb1c9c2701bf816b"},
|
||||
],
|
||||
"resource_groups": [
|
||||
{"id": "6d7f2f5f5b1d4a0e9081fdc98d432fd1"},
|
||||
{"id": "6d7f2f5f5b1d4a0e9081fdc98d432fd1"},
|
||||
{"id": "6d7f2f5f5b1d4a0e9081fdc98d432fd1"},
|
||||
],
|
||||
},
|
||||
"resource_groups": [{"id": "6d7f2f5f5b1d4a0e9081fdc98d432fd1"}],
|
||||
}
|
||||
],
|
||||
)
|
||||
assert_matches_type(Optional[Member], member, path=["response"])
|
||||
|
|
@ -955,36 +603,8 @@ class TestAsyncMembers:
|
|||
{"id": "c8fed203ed3043cba015a93ad1616f1f"},
|
||||
{"id": "82e64a83756745bbbb1c9c2701bf816b"},
|
||||
],
|
||||
"resource_groups": [
|
||||
{"id": "6d7f2f5f5b1d4a0e9081fdc98d432fd1"},
|
||||
{"id": "6d7f2f5f5b1d4a0e9081fdc98d432fd1"},
|
||||
{"id": "6d7f2f5f5b1d4a0e9081fdc98d432fd1"},
|
||||
],
|
||||
},
|
||||
{
|
||||
"access": "allow",
|
||||
"permission_groups": [
|
||||
{"id": "c8fed203ed3043cba015a93ad1616f1f"},
|
||||
{"id": "82e64a83756745bbbb1c9c2701bf816b"},
|
||||
],
|
||||
"resource_groups": [
|
||||
{"id": "6d7f2f5f5b1d4a0e9081fdc98d432fd1"},
|
||||
{"id": "6d7f2f5f5b1d4a0e9081fdc98d432fd1"},
|
||||
{"id": "6d7f2f5f5b1d4a0e9081fdc98d432fd1"},
|
||||
],
|
||||
},
|
||||
{
|
||||
"access": "allow",
|
||||
"permission_groups": [
|
||||
{"id": "c8fed203ed3043cba015a93ad1616f1f"},
|
||||
{"id": "82e64a83756745bbbb1c9c2701bf816b"},
|
||||
],
|
||||
"resource_groups": [
|
||||
{"id": "6d7f2f5f5b1d4a0e9081fdc98d432fd1"},
|
||||
{"id": "6d7f2f5f5b1d4a0e9081fdc98d432fd1"},
|
||||
{"id": "6d7f2f5f5b1d4a0e9081fdc98d432fd1"},
|
||||
],
|
||||
},
|
||||
"resource_groups": [{"id": "6d7f2f5f5b1d4a0e9081fdc98d432fd1"}],
|
||||
}
|
||||
],
|
||||
status="accepted",
|
||||
)
|
||||
|
|
@ -1003,36 +623,8 @@ class TestAsyncMembers:
|
|||
{"id": "c8fed203ed3043cba015a93ad1616f1f"},
|
||||
{"id": "82e64a83756745bbbb1c9c2701bf816b"},
|
||||
],
|
||||
"resource_groups": [
|
||||
{"id": "6d7f2f5f5b1d4a0e9081fdc98d432fd1"},
|
||||
{"id": "6d7f2f5f5b1d4a0e9081fdc98d432fd1"},
|
||||
{"id": "6d7f2f5f5b1d4a0e9081fdc98d432fd1"},
|
||||
],
|
||||
},
|
||||
{
|
||||
"access": "allow",
|
||||
"permission_groups": [
|
||||
{"id": "c8fed203ed3043cba015a93ad1616f1f"},
|
||||
{"id": "82e64a83756745bbbb1c9c2701bf816b"},
|
||||
],
|
||||
"resource_groups": [
|
||||
{"id": "6d7f2f5f5b1d4a0e9081fdc98d432fd1"},
|
||||
{"id": "6d7f2f5f5b1d4a0e9081fdc98d432fd1"},
|
||||
{"id": "6d7f2f5f5b1d4a0e9081fdc98d432fd1"},
|
||||
],
|
||||
},
|
||||
{
|
||||
"access": "allow",
|
||||
"permission_groups": [
|
||||
{"id": "c8fed203ed3043cba015a93ad1616f1f"},
|
||||
{"id": "82e64a83756745bbbb1c9c2701bf816b"},
|
||||
],
|
||||
"resource_groups": [
|
||||
{"id": "6d7f2f5f5b1d4a0e9081fdc98d432fd1"},
|
||||
{"id": "6d7f2f5f5b1d4a0e9081fdc98d432fd1"},
|
||||
{"id": "6d7f2f5f5b1d4a0e9081fdc98d432fd1"},
|
||||
],
|
||||
},
|
||||
"resource_groups": [{"id": "6d7f2f5f5b1d4a0e9081fdc98d432fd1"}],
|
||||
}
|
||||
],
|
||||
)
|
||||
|
||||
|
|
@ -1054,36 +646,8 @@ class TestAsyncMembers:
|
|||
{"id": "c8fed203ed3043cba015a93ad1616f1f"},
|
||||
{"id": "82e64a83756745bbbb1c9c2701bf816b"},
|
||||
],
|
||||
"resource_groups": [
|
||||
{"id": "6d7f2f5f5b1d4a0e9081fdc98d432fd1"},
|
||||
{"id": "6d7f2f5f5b1d4a0e9081fdc98d432fd1"},
|
||||
{"id": "6d7f2f5f5b1d4a0e9081fdc98d432fd1"},
|
||||
],
|
||||
},
|
||||
{
|
||||
"access": "allow",
|
||||
"permission_groups": [
|
||||
{"id": "c8fed203ed3043cba015a93ad1616f1f"},
|
||||
{"id": "82e64a83756745bbbb1c9c2701bf816b"},
|
||||
],
|
||||
"resource_groups": [
|
||||
{"id": "6d7f2f5f5b1d4a0e9081fdc98d432fd1"},
|
||||
{"id": "6d7f2f5f5b1d4a0e9081fdc98d432fd1"},
|
||||
{"id": "6d7f2f5f5b1d4a0e9081fdc98d432fd1"},
|
||||
],
|
||||
},
|
||||
{
|
||||
"access": "allow",
|
||||
"permission_groups": [
|
||||
{"id": "c8fed203ed3043cba015a93ad1616f1f"},
|
||||
{"id": "82e64a83756745bbbb1c9c2701bf816b"},
|
||||
],
|
||||
"resource_groups": [
|
||||
{"id": "6d7f2f5f5b1d4a0e9081fdc98d432fd1"},
|
||||
{"id": "6d7f2f5f5b1d4a0e9081fdc98d432fd1"},
|
||||
{"id": "6d7f2f5f5b1d4a0e9081fdc98d432fd1"},
|
||||
],
|
||||
},
|
||||
"resource_groups": [{"id": "6d7f2f5f5b1d4a0e9081fdc98d432fd1"}],
|
||||
}
|
||||
],
|
||||
) as response:
|
||||
assert not response.is_closed
|
||||
|
|
@ -1108,36 +672,8 @@ class TestAsyncMembers:
|
|||
{"id": "c8fed203ed3043cba015a93ad1616f1f"},
|
||||
{"id": "82e64a83756745bbbb1c9c2701bf816b"},
|
||||
],
|
||||
"resource_groups": [
|
||||
{"id": "6d7f2f5f5b1d4a0e9081fdc98d432fd1"},
|
||||
{"id": "6d7f2f5f5b1d4a0e9081fdc98d432fd1"},
|
||||
{"id": "6d7f2f5f5b1d4a0e9081fdc98d432fd1"},
|
||||
],
|
||||
},
|
||||
{
|
||||
"access": "allow",
|
||||
"permission_groups": [
|
||||
{"id": "c8fed203ed3043cba015a93ad1616f1f"},
|
||||
{"id": "82e64a83756745bbbb1c9c2701bf816b"},
|
||||
],
|
||||
"resource_groups": [
|
||||
{"id": "6d7f2f5f5b1d4a0e9081fdc98d432fd1"},
|
||||
{"id": "6d7f2f5f5b1d4a0e9081fdc98d432fd1"},
|
||||
{"id": "6d7f2f5f5b1d4a0e9081fdc98d432fd1"},
|
||||
],
|
||||
},
|
||||
{
|
||||
"access": "allow",
|
||||
"permission_groups": [
|
||||
{"id": "c8fed203ed3043cba015a93ad1616f1f"},
|
||||
{"id": "82e64a83756745bbbb1c9c2701bf816b"},
|
||||
],
|
||||
"resource_groups": [
|
||||
{"id": "6d7f2f5f5b1d4a0e9081fdc98d432fd1"},
|
||||
{"id": "6d7f2f5f5b1d4a0e9081fdc98d432fd1"},
|
||||
{"id": "6d7f2f5f5b1d4a0e9081fdc98d432fd1"},
|
||||
],
|
||||
},
|
||||
"resource_groups": [{"id": "6d7f2f5f5b1d4a0e9081fdc98d432fd1"}],
|
||||
}
|
||||
],
|
||||
)
|
||||
|
||||
|
|
@ -1156,11 +692,7 @@ class TestAsyncMembers:
|
|||
member = await async_client.accounts.members.update(
|
||||
member_id="4536bcfad5faccb111b47003c79917fa",
|
||||
account_id="eb78d65290b24279ba6f44721b3ea3c4",
|
||||
roles=[
|
||||
{"id": "3536bcfad5faccb999b47003c79917fb"},
|
||||
{"id": "3536bcfad5faccb999b47003c79917fb"},
|
||||
{"id": "3536bcfad5faccb999b47003c79917fb"},
|
||||
],
|
||||
roles=[{"id": "3536bcfad5faccb999b47003c79917fb"}],
|
||||
)
|
||||
assert_matches_type(Optional[Member], member, path=["response"])
|
||||
|
||||
|
|
@ -1220,36 +752,8 @@ class TestAsyncMembers:
|
|||
{"id": "c8fed203ed3043cba015a93ad1616f1f"},
|
||||
{"id": "82e64a83756745bbbb1c9c2701bf816b"},
|
||||
],
|
||||
"resource_groups": [
|
||||
{"id": "6d7f2f5f5b1d4a0e9081fdc98d432fd1"},
|
||||
{"id": "6d7f2f5f5b1d4a0e9081fdc98d432fd1"},
|
||||
{"id": "6d7f2f5f5b1d4a0e9081fdc98d432fd1"},
|
||||
],
|
||||
},
|
||||
{
|
||||
"access": "allow",
|
||||
"permission_groups": [
|
||||
{"id": "c8fed203ed3043cba015a93ad1616f1f"},
|
||||
{"id": "82e64a83756745bbbb1c9c2701bf816b"},
|
||||
],
|
||||
"resource_groups": [
|
||||
{"id": "6d7f2f5f5b1d4a0e9081fdc98d432fd1"},
|
||||
{"id": "6d7f2f5f5b1d4a0e9081fdc98d432fd1"},
|
||||
{"id": "6d7f2f5f5b1d4a0e9081fdc98d432fd1"},
|
||||
],
|
||||
},
|
||||
{
|
||||
"access": "allow",
|
||||
"permission_groups": [
|
||||
{"id": "c8fed203ed3043cba015a93ad1616f1f"},
|
||||
{"id": "82e64a83756745bbbb1c9c2701bf816b"},
|
||||
],
|
||||
"resource_groups": [
|
||||
{"id": "6d7f2f5f5b1d4a0e9081fdc98d432fd1"},
|
||||
{"id": "6d7f2f5f5b1d4a0e9081fdc98d432fd1"},
|
||||
{"id": "6d7f2f5f5b1d4a0e9081fdc98d432fd1"},
|
||||
],
|
||||
},
|
||||
"resource_groups": [{"id": "6d7f2f5f5b1d4a0e9081fdc98d432fd1"}],
|
||||
}
|
||||
],
|
||||
)
|
||||
assert_matches_type(Optional[Member], member, path=["response"])
|
||||
|
|
@ -1267,36 +771,8 @@ class TestAsyncMembers:
|
|||
{"id": "c8fed203ed3043cba015a93ad1616f1f"},
|
||||
{"id": "82e64a83756745bbbb1c9c2701bf816b"},
|
||||
],
|
||||
"resource_groups": [
|
||||
{"id": "6d7f2f5f5b1d4a0e9081fdc98d432fd1"},
|
||||
{"id": "6d7f2f5f5b1d4a0e9081fdc98d432fd1"},
|
||||
{"id": "6d7f2f5f5b1d4a0e9081fdc98d432fd1"},
|
||||
],
|
||||
},
|
||||
{
|
||||
"access": "allow",
|
||||
"permission_groups": [
|
||||
{"id": "c8fed203ed3043cba015a93ad1616f1f"},
|
||||
{"id": "82e64a83756745bbbb1c9c2701bf816b"},
|
||||
],
|
||||
"resource_groups": [
|
||||
{"id": "6d7f2f5f5b1d4a0e9081fdc98d432fd1"},
|
||||
{"id": "6d7f2f5f5b1d4a0e9081fdc98d432fd1"},
|
||||
{"id": "6d7f2f5f5b1d4a0e9081fdc98d432fd1"},
|
||||
],
|
||||
},
|
||||
{
|
||||
"access": "allow",
|
||||
"permission_groups": [
|
||||
{"id": "c8fed203ed3043cba015a93ad1616f1f"},
|
||||
{"id": "82e64a83756745bbbb1c9c2701bf816b"},
|
||||
],
|
||||
"resource_groups": [
|
||||
{"id": "6d7f2f5f5b1d4a0e9081fdc98d432fd1"},
|
||||
{"id": "6d7f2f5f5b1d4a0e9081fdc98d432fd1"},
|
||||
{"id": "6d7f2f5f5b1d4a0e9081fdc98d432fd1"},
|
||||
],
|
||||
},
|
||||
"resource_groups": [{"id": "6d7f2f5f5b1d4a0e9081fdc98d432fd1"}],
|
||||
}
|
||||
],
|
||||
)
|
||||
|
||||
|
|
@ -1318,36 +794,8 @@ class TestAsyncMembers:
|
|||
{"id": "c8fed203ed3043cba015a93ad1616f1f"},
|
||||
{"id": "82e64a83756745bbbb1c9c2701bf816b"},
|
||||
],
|
||||
"resource_groups": [
|
||||
{"id": "6d7f2f5f5b1d4a0e9081fdc98d432fd1"},
|
||||
{"id": "6d7f2f5f5b1d4a0e9081fdc98d432fd1"},
|
||||
{"id": "6d7f2f5f5b1d4a0e9081fdc98d432fd1"},
|
||||
],
|
||||
},
|
||||
{
|
||||
"access": "allow",
|
||||
"permission_groups": [
|
||||
{"id": "c8fed203ed3043cba015a93ad1616f1f"},
|
||||
{"id": "82e64a83756745bbbb1c9c2701bf816b"},
|
||||
],
|
||||
"resource_groups": [
|
||||
{"id": "6d7f2f5f5b1d4a0e9081fdc98d432fd1"},
|
||||
{"id": "6d7f2f5f5b1d4a0e9081fdc98d432fd1"},
|
||||
{"id": "6d7f2f5f5b1d4a0e9081fdc98d432fd1"},
|
||||
],
|
||||
},
|
||||
{
|
||||
"access": "allow",
|
||||
"permission_groups": [
|
||||
{"id": "c8fed203ed3043cba015a93ad1616f1f"},
|
||||
{"id": "82e64a83756745bbbb1c9c2701bf816b"},
|
||||
],
|
||||
"resource_groups": [
|
||||
{"id": "6d7f2f5f5b1d4a0e9081fdc98d432fd1"},
|
||||
{"id": "6d7f2f5f5b1d4a0e9081fdc98d432fd1"},
|
||||
{"id": "6d7f2f5f5b1d4a0e9081fdc98d432fd1"},
|
||||
],
|
||||
},
|
||||
"resource_groups": [{"id": "6d7f2f5f5b1d4a0e9081fdc98d432fd1"}],
|
||||
}
|
||||
],
|
||||
) as response:
|
||||
assert not response.is_closed
|
||||
|
|
@ -1372,36 +820,8 @@ class TestAsyncMembers:
|
|||
{"id": "c8fed203ed3043cba015a93ad1616f1f"},
|
||||
{"id": "82e64a83756745bbbb1c9c2701bf816b"},
|
||||
],
|
||||
"resource_groups": [
|
||||
{"id": "6d7f2f5f5b1d4a0e9081fdc98d432fd1"},
|
||||
{"id": "6d7f2f5f5b1d4a0e9081fdc98d432fd1"},
|
||||
{"id": "6d7f2f5f5b1d4a0e9081fdc98d432fd1"},
|
||||
],
|
||||
},
|
||||
{
|
||||
"access": "allow",
|
||||
"permission_groups": [
|
||||
{"id": "c8fed203ed3043cba015a93ad1616f1f"},
|
||||
{"id": "82e64a83756745bbbb1c9c2701bf816b"},
|
||||
],
|
||||
"resource_groups": [
|
||||
{"id": "6d7f2f5f5b1d4a0e9081fdc98d432fd1"},
|
||||
{"id": "6d7f2f5f5b1d4a0e9081fdc98d432fd1"},
|
||||
{"id": "6d7f2f5f5b1d4a0e9081fdc98d432fd1"},
|
||||
],
|
||||
},
|
||||
{
|
||||
"access": "allow",
|
||||
"permission_groups": [
|
||||
{"id": "c8fed203ed3043cba015a93ad1616f1f"},
|
||||
{"id": "82e64a83756745bbbb1c9c2701bf816b"},
|
||||
],
|
||||
"resource_groups": [
|
||||
{"id": "6d7f2f5f5b1d4a0e9081fdc98d432fd1"},
|
||||
{"id": "6d7f2f5f5b1d4a0e9081fdc98d432fd1"},
|
||||
{"id": "6d7f2f5f5b1d4a0e9081fdc98d432fd1"},
|
||||
],
|
||||
},
|
||||
"resource_groups": [{"id": "6d7f2f5f5b1d4a0e9081fdc98d432fd1"}],
|
||||
}
|
||||
],
|
||||
)
|
||||
|
||||
|
|
@ -1416,36 +836,8 @@ class TestAsyncMembers:
|
|||
{"id": "c8fed203ed3043cba015a93ad1616f1f"},
|
||||
{"id": "82e64a83756745bbbb1c9c2701bf816b"},
|
||||
],
|
||||
"resource_groups": [
|
||||
{"id": "6d7f2f5f5b1d4a0e9081fdc98d432fd1"},
|
||||
{"id": "6d7f2f5f5b1d4a0e9081fdc98d432fd1"},
|
||||
{"id": "6d7f2f5f5b1d4a0e9081fdc98d432fd1"},
|
||||
],
|
||||
},
|
||||
{
|
||||
"access": "allow",
|
||||
"permission_groups": [
|
||||
{"id": "c8fed203ed3043cba015a93ad1616f1f"},
|
||||
{"id": "82e64a83756745bbbb1c9c2701bf816b"},
|
||||
],
|
||||
"resource_groups": [
|
||||
{"id": "6d7f2f5f5b1d4a0e9081fdc98d432fd1"},
|
||||
{"id": "6d7f2f5f5b1d4a0e9081fdc98d432fd1"},
|
||||
{"id": "6d7f2f5f5b1d4a0e9081fdc98d432fd1"},
|
||||
],
|
||||
},
|
||||
{
|
||||
"access": "allow",
|
||||
"permission_groups": [
|
||||
{"id": "c8fed203ed3043cba015a93ad1616f1f"},
|
||||
{"id": "82e64a83756745bbbb1c9c2701bf816b"},
|
||||
],
|
||||
"resource_groups": [
|
||||
{"id": "6d7f2f5f5b1d4a0e9081fdc98d432fd1"},
|
||||
{"id": "6d7f2f5f5b1d4a0e9081fdc98d432fd1"},
|
||||
{"id": "6d7f2f5f5b1d4a0e9081fdc98d432fd1"},
|
||||
],
|
||||
},
|
||||
"resource_groups": [{"id": "6d7f2f5f5b1d4a0e9081fdc98d432fd1"}],
|
||||
}
|
||||
],
|
||||
)
|
||||
|
||||
|
|
|
|||
|
|
@ -41,7 +41,7 @@ class TestSubscriptions:
|
|||
"is_contract": False,
|
||||
"public_name": "Business Plan",
|
||||
"scope": "zone",
|
||||
"sets": ["string", "string", "string"],
|
||||
"sets": ["string"],
|
||||
},
|
||||
)
|
||||
assert_matches_type(SubscriptionCreateResponse, subscription, path=["response"])
|
||||
|
|
@ -98,7 +98,7 @@ class TestSubscriptions:
|
|||
"is_contract": False,
|
||||
"public_name": "Business Plan",
|
||||
"scope": "zone",
|
||||
"sets": ["string", "string", "string"],
|
||||
"sets": ["string"],
|
||||
},
|
||||
)
|
||||
assert_matches_type(SubscriptionUpdateResponse, subscription, path=["response"])
|
||||
|
|
@ -256,7 +256,7 @@ class TestAsyncSubscriptions:
|
|||
"is_contract": False,
|
||||
"public_name": "Business Plan",
|
||||
"scope": "zone",
|
||||
"sets": ["string", "string", "string"],
|
||||
"sets": ["string"],
|
||||
},
|
||||
)
|
||||
assert_matches_type(SubscriptionCreateResponse, subscription, path=["response"])
|
||||
|
|
@ -313,7 +313,7 @@ class TestAsyncSubscriptions:
|
|||
"is_contract": False,
|
||||
"public_name": "Business Plan",
|
||||
"scope": "zone",
|
||||
"sets": ["string", "string", "string"],
|
||||
"sets": ["string"],
|
||||
},
|
||||
)
|
||||
assert_matches_type(SubscriptionUpdateResponse, subscription, path=["response"])
|
||||
|
|
|
|||
|
|
@ -34,17 +34,7 @@ class TestTokens:
|
|||
"effect": "allow",
|
||||
"permission_groups": [{}, {}],
|
||||
"resources": {},
|
||||
},
|
||||
{
|
||||
"effect": "allow",
|
||||
"permission_groups": [{}, {}],
|
||||
"resources": {},
|
||||
},
|
||||
{
|
||||
"effect": "allow",
|
||||
"permission_groups": [{}, {}],
|
||||
"resources": {},
|
||||
},
|
||||
}
|
||||
],
|
||||
)
|
||||
assert_matches_type(Optional[TokenCreateResponse], token, path=["response"])
|
||||
|
|
@ -75,49 +65,7 @@ class TestTokens:
|
|||
"resource": "resource",
|
||||
"scope": "scope",
|
||||
},
|
||||
},
|
||||
{
|
||||
"effect": "allow",
|
||||
"permission_groups": [
|
||||
{
|
||||
"meta": {
|
||||
"key": "key",
|
||||
"value": "value",
|
||||
}
|
||||
},
|
||||
{
|
||||
"meta": {
|
||||
"key": "key",
|
||||
"value": "value",
|
||||
}
|
||||
},
|
||||
],
|
||||
"resources": {
|
||||
"resource": "resource",
|
||||
"scope": "scope",
|
||||
},
|
||||
},
|
||||
{
|
||||
"effect": "allow",
|
||||
"permission_groups": [
|
||||
{
|
||||
"meta": {
|
||||
"key": "key",
|
||||
"value": "value",
|
||||
}
|
||||
},
|
||||
{
|
||||
"meta": {
|
||||
"key": "key",
|
||||
"value": "value",
|
||||
}
|
||||
},
|
||||
],
|
||||
"resources": {
|
||||
"resource": "resource",
|
||||
"scope": "scope",
|
||||
},
|
||||
},
|
||||
}
|
||||
],
|
||||
condition={
|
||||
"request_ip": {
|
||||
|
|
@ -140,17 +88,7 @@ class TestTokens:
|
|||
"effect": "allow",
|
||||
"permission_groups": [{}, {}],
|
||||
"resources": {},
|
||||
},
|
||||
{
|
||||
"effect": "allow",
|
||||
"permission_groups": [{}, {}],
|
||||
"resources": {},
|
||||
},
|
||||
{
|
||||
"effect": "allow",
|
||||
"permission_groups": [{}, {}],
|
||||
"resources": {},
|
||||
},
|
||||
}
|
||||
],
|
||||
)
|
||||
|
||||
|
|
@ -169,17 +107,7 @@ class TestTokens:
|
|||
"effect": "allow",
|
||||
"permission_groups": [{}, {}],
|
||||
"resources": {},
|
||||
},
|
||||
{
|
||||
"effect": "allow",
|
||||
"permission_groups": [{}, {}],
|
||||
"resources": {},
|
||||
},
|
||||
{
|
||||
"effect": "allow",
|
||||
"permission_groups": [{}, {}],
|
||||
"resources": {},
|
||||
},
|
||||
}
|
||||
],
|
||||
) as response:
|
||||
assert not response.is_closed
|
||||
|
|
@ -201,17 +129,7 @@ class TestTokens:
|
|||
"effect": "allow",
|
||||
"permission_groups": [{}, {}],
|
||||
"resources": {},
|
||||
},
|
||||
{
|
||||
"effect": "allow",
|
||||
"permission_groups": [{}, {}],
|
||||
"resources": {},
|
||||
},
|
||||
{
|
||||
"effect": "allow",
|
||||
"permission_groups": [{}, {}],
|
||||
"resources": {},
|
||||
},
|
||||
}
|
||||
],
|
||||
)
|
||||
|
||||
|
|
@ -226,17 +144,7 @@ class TestTokens:
|
|||
"effect": "allow",
|
||||
"permission_groups": [{}, {}],
|
||||
"resources": {},
|
||||
},
|
||||
{
|
||||
"effect": "allow",
|
||||
"permission_groups": [{}, {}],
|
||||
"resources": {},
|
||||
},
|
||||
{
|
||||
"effect": "allow",
|
||||
"permission_groups": [{}, {}],
|
||||
"resources": {},
|
||||
},
|
||||
}
|
||||
],
|
||||
status="active",
|
||||
)
|
||||
|
|
@ -269,49 +177,7 @@ class TestTokens:
|
|||
"resource": "resource",
|
||||
"scope": "scope",
|
||||
},
|
||||
},
|
||||
{
|
||||
"effect": "allow",
|
||||
"permission_groups": [
|
||||
{
|
||||
"meta": {
|
||||
"key": "key",
|
||||
"value": "value",
|
||||
}
|
||||
},
|
||||
{
|
||||
"meta": {
|
||||
"key": "key",
|
||||
"value": "value",
|
||||
}
|
||||
},
|
||||
],
|
||||
"resources": {
|
||||
"resource": "resource",
|
||||
"scope": "scope",
|
||||
},
|
||||
},
|
||||
{
|
||||
"effect": "allow",
|
||||
"permission_groups": [
|
||||
{
|
||||
"meta": {
|
||||
"key": "key",
|
||||
"value": "value",
|
||||
}
|
||||
},
|
||||
{
|
||||
"meta": {
|
||||
"key": "key",
|
||||
"value": "value",
|
||||
}
|
||||
},
|
||||
],
|
||||
"resources": {
|
||||
"resource": "resource",
|
||||
"scope": "scope",
|
||||
},
|
||||
},
|
||||
}
|
||||
],
|
||||
status="active",
|
||||
condition={
|
||||
|
|
@ -336,17 +202,7 @@ class TestTokens:
|
|||
"effect": "allow",
|
||||
"permission_groups": [{}, {}],
|
||||
"resources": {},
|
||||
},
|
||||
{
|
||||
"effect": "allow",
|
||||
"permission_groups": [{}, {}],
|
||||
"resources": {},
|
||||
},
|
||||
{
|
||||
"effect": "allow",
|
||||
"permission_groups": [{}, {}],
|
||||
"resources": {},
|
||||
},
|
||||
}
|
||||
],
|
||||
status="active",
|
||||
)
|
||||
|
|
@ -367,17 +223,7 @@ class TestTokens:
|
|||
"effect": "allow",
|
||||
"permission_groups": [{}, {}],
|
||||
"resources": {},
|
||||
},
|
||||
{
|
||||
"effect": "allow",
|
||||
"permission_groups": [{}, {}],
|
||||
"resources": {},
|
||||
},
|
||||
{
|
||||
"effect": "allow",
|
||||
"permission_groups": [{}, {}],
|
||||
"resources": {},
|
||||
},
|
||||
}
|
||||
],
|
||||
status="active",
|
||||
) as response:
|
||||
|
|
@ -401,17 +247,7 @@ class TestTokens:
|
|||
"effect": "allow",
|
||||
"permission_groups": [{}, {}],
|
||||
"resources": {},
|
||||
},
|
||||
{
|
||||
"effect": "allow",
|
||||
"permission_groups": [{}, {}],
|
||||
"resources": {},
|
||||
},
|
||||
{
|
||||
"effect": "allow",
|
||||
"permission_groups": [{}, {}],
|
||||
"resources": {},
|
||||
},
|
||||
}
|
||||
],
|
||||
status="active",
|
||||
)
|
||||
|
|
@ -426,17 +262,7 @@ class TestTokens:
|
|||
"effect": "allow",
|
||||
"permission_groups": [{}, {}],
|
||||
"resources": {},
|
||||
},
|
||||
{
|
||||
"effect": "allow",
|
||||
"permission_groups": [{}, {}],
|
||||
"resources": {},
|
||||
},
|
||||
{
|
||||
"effect": "allow",
|
||||
"permission_groups": [{}, {}],
|
||||
"resources": {},
|
||||
},
|
||||
}
|
||||
],
|
||||
status="active",
|
||||
)
|
||||
|
|
@ -637,17 +463,7 @@ class TestAsyncTokens:
|
|||
"effect": "allow",
|
||||
"permission_groups": [{}, {}],
|
||||
"resources": {},
|
||||
},
|
||||
{
|
||||
"effect": "allow",
|
||||
"permission_groups": [{}, {}],
|
||||
"resources": {},
|
||||
},
|
||||
{
|
||||
"effect": "allow",
|
||||
"permission_groups": [{}, {}],
|
||||
"resources": {},
|
||||
},
|
||||
}
|
||||
],
|
||||
)
|
||||
assert_matches_type(Optional[TokenCreateResponse], token, path=["response"])
|
||||
|
|
@ -678,49 +494,7 @@ class TestAsyncTokens:
|
|||
"resource": "resource",
|
||||
"scope": "scope",
|
||||
},
|
||||
},
|
||||
{
|
||||
"effect": "allow",
|
||||
"permission_groups": [
|
||||
{
|
||||
"meta": {
|
||||
"key": "key",
|
||||
"value": "value",
|
||||
}
|
||||
},
|
||||
{
|
||||
"meta": {
|
||||
"key": "key",
|
||||
"value": "value",
|
||||
}
|
||||
},
|
||||
],
|
||||
"resources": {
|
||||
"resource": "resource",
|
||||
"scope": "scope",
|
||||
},
|
||||
},
|
||||
{
|
||||
"effect": "allow",
|
||||
"permission_groups": [
|
||||
{
|
||||
"meta": {
|
||||
"key": "key",
|
||||
"value": "value",
|
||||
}
|
||||
},
|
||||
{
|
||||
"meta": {
|
||||
"key": "key",
|
||||
"value": "value",
|
||||
}
|
||||
},
|
||||
],
|
||||
"resources": {
|
||||
"resource": "resource",
|
||||
"scope": "scope",
|
||||
},
|
||||
},
|
||||
}
|
||||
],
|
||||
condition={
|
||||
"request_ip": {
|
||||
|
|
@ -743,17 +517,7 @@ class TestAsyncTokens:
|
|||
"effect": "allow",
|
||||
"permission_groups": [{}, {}],
|
||||
"resources": {},
|
||||
},
|
||||
{
|
||||
"effect": "allow",
|
||||
"permission_groups": [{}, {}],
|
||||
"resources": {},
|
||||
},
|
||||
{
|
||||
"effect": "allow",
|
||||
"permission_groups": [{}, {}],
|
||||
"resources": {},
|
||||
},
|
||||
}
|
||||
],
|
||||
)
|
||||
|
||||
|
|
@ -772,17 +536,7 @@ class TestAsyncTokens:
|
|||
"effect": "allow",
|
||||
"permission_groups": [{}, {}],
|
||||
"resources": {},
|
||||
},
|
||||
{
|
||||
"effect": "allow",
|
||||
"permission_groups": [{}, {}],
|
||||
"resources": {},
|
||||
},
|
||||
{
|
||||
"effect": "allow",
|
||||
"permission_groups": [{}, {}],
|
||||
"resources": {},
|
||||
},
|
||||
}
|
||||
],
|
||||
) as response:
|
||||
assert not response.is_closed
|
||||
|
|
@ -804,17 +558,7 @@ class TestAsyncTokens:
|
|||
"effect": "allow",
|
||||
"permission_groups": [{}, {}],
|
||||
"resources": {},
|
||||
},
|
||||
{
|
||||
"effect": "allow",
|
||||
"permission_groups": [{}, {}],
|
||||
"resources": {},
|
||||
},
|
||||
{
|
||||
"effect": "allow",
|
||||
"permission_groups": [{}, {}],
|
||||
"resources": {},
|
||||
},
|
||||
}
|
||||
],
|
||||
)
|
||||
|
||||
|
|
@ -829,17 +573,7 @@ class TestAsyncTokens:
|
|||
"effect": "allow",
|
||||
"permission_groups": [{}, {}],
|
||||
"resources": {},
|
||||
},
|
||||
{
|
||||
"effect": "allow",
|
||||
"permission_groups": [{}, {}],
|
||||
"resources": {},
|
||||
},
|
||||
{
|
||||
"effect": "allow",
|
||||
"permission_groups": [{}, {}],
|
||||
"resources": {},
|
||||
},
|
||||
}
|
||||
],
|
||||
status="active",
|
||||
)
|
||||
|
|
@ -872,49 +606,7 @@ class TestAsyncTokens:
|
|||
"resource": "resource",
|
||||
"scope": "scope",
|
||||
},
|
||||
},
|
||||
{
|
||||
"effect": "allow",
|
||||
"permission_groups": [
|
||||
{
|
||||
"meta": {
|
||||
"key": "key",
|
||||
"value": "value",
|
||||
}
|
||||
},
|
||||
{
|
||||
"meta": {
|
||||
"key": "key",
|
||||
"value": "value",
|
||||
}
|
||||
},
|
||||
],
|
||||
"resources": {
|
||||
"resource": "resource",
|
||||
"scope": "scope",
|
||||
},
|
||||
},
|
||||
{
|
||||
"effect": "allow",
|
||||
"permission_groups": [
|
||||
{
|
||||
"meta": {
|
||||
"key": "key",
|
||||
"value": "value",
|
||||
}
|
||||
},
|
||||
{
|
||||
"meta": {
|
||||
"key": "key",
|
||||
"value": "value",
|
||||
}
|
||||
},
|
||||
],
|
||||
"resources": {
|
||||
"resource": "resource",
|
||||
"scope": "scope",
|
||||
},
|
||||
},
|
||||
}
|
||||
],
|
||||
status="active",
|
||||
condition={
|
||||
|
|
@ -939,17 +631,7 @@ class TestAsyncTokens:
|
|||
"effect": "allow",
|
||||
"permission_groups": [{}, {}],
|
||||
"resources": {},
|
||||
},
|
||||
{
|
||||
"effect": "allow",
|
||||
"permission_groups": [{}, {}],
|
||||
"resources": {},
|
||||
},
|
||||
{
|
||||
"effect": "allow",
|
||||
"permission_groups": [{}, {}],
|
||||
"resources": {},
|
||||
},
|
||||
}
|
||||
],
|
||||
status="active",
|
||||
)
|
||||
|
|
@ -970,17 +652,7 @@ class TestAsyncTokens:
|
|||
"effect": "allow",
|
||||
"permission_groups": [{}, {}],
|
||||
"resources": {},
|
||||
},
|
||||
{
|
||||
"effect": "allow",
|
||||
"permission_groups": [{}, {}],
|
||||
"resources": {},
|
||||
},
|
||||
{
|
||||
"effect": "allow",
|
||||
"permission_groups": [{}, {}],
|
||||
"resources": {},
|
||||
},
|
||||
}
|
||||
],
|
||||
status="active",
|
||||
) as response:
|
||||
|
|
@ -1004,17 +676,7 @@ class TestAsyncTokens:
|
|||
"effect": "allow",
|
||||
"permission_groups": [{}, {}],
|
||||
"resources": {},
|
||||
},
|
||||
{
|
||||
"effect": "allow",
|
||||
"permission_groups": [{}, {}],
|
||||
"resources": {},
|
||||
},
|
||||
{
|
||||
"effect": "allow",
|
||||
"permission_groups": [{}, {}],
|
||||
"resources": {},
|
||||
},
|
||||
}
|
||||
],
|
||||
status="active",
|
||||
)
|
||||
|
|
@ -1029,17 +691,7 @@ class TestAsyncTokens:
|
|||
"effect": "allow",
|
||||
"permission_groups": [{}, {}],
|
||||
"resources": {},
|
||||
},
|
||||
{
|
||||
"effect": "allow",
|
||||
"permission_groups": [{}, {}],
|
||||
"resources": {},
|
||||
},
|
||||
{
|
||||
"effect": "allow",
|
||||
"permission_groups": [{}, {}],
|
||||
"resources": {},
|
||||
},
|
||||
}
|
||||
],
|
||||
status="active",
|
||||
)
|
||||
|
|
|
|||
|
|
@ -36,20 +36,12 @@ class TestAddressMaps:
|
|||
account_id="023e105f4ecef8ad9ca31a8372d0c353",
|
||||
description="My Ecommerce zones",
|
||||
enabled=True,
|
||||
ips=["192.0.2.1", "192.0.2.1", "192.0.2.1"],
|
||||
ips=["192.0.2.1"],
|
||||
memberships=[
|
||||
{
|
||||
"identifier": "023e105f4ecef8ad9ca31a8372d0c353",
|
||||
"kind": "zone",
|
||||
},
|
||||
{
|
||||
"identifier": "023e105f4ecef8ad9ca31a8372d0c353",
|
||||
"kind": "zone",
|
||||
},
|
||||
{
|
||||
"identifier": "023e105f4ecef8ad9ca31a8372d0c353",
|
||||
"kind": "zone",
|
||||
},
|
||||
}
|
||||
],
|
||||
)
|
||||
assert_matches_type(Optional[AddressMapCreateResponse], address_map, path=["response"])
|
||||
|
|
@ -295,20 +287,12 @@ class TestAsyncAddressMaps:
|
|||
account_id="023e105f4ecef8ad9ca31a8372d0c353",
|
||||
description="My Ecommerce zones",
|
||||
enabled=True,
|
||||
ips=["192.0.2.1", "192.0.2.1", "192.0.2.1"],
|
||||
ips=["192.0.2.1"],
|
||||
memberships=[
|
||||
{
|
||||
"identifier": "023e105f4ecef8ad9ca31a8372d0c353",
|
||||
"kind": "zone",
|
||||
},
|
||||
{
|
||||
"identifier": "023e105f4ecef8ad9ca31a8372d0c353",
|
||||
"kind": "zone",
|
||||
},
|
||||
{
|
||||
"identifier": "023e105f4ecef8ad9ca31a8372d0c353",
|
||||
"kind": "zone",
|
||||
},
|
||||
}
|
||||
],
|
||||
)
|
||||
assert_matches_type(Optional[AddressMapCreateResponse], address_map, path=["response"])
|
||||
|
|
|
|||
|
|
@ -34,18 +34,8 @@ class TestDatasets:
|
|||
{
|
||||
"key": "created_at",
|
||||
"operator": "eq",
|
||||
"value": ["string", "string", "string"],
|
||||
},
|
||||
{
|
||||
"key": "created_at",
|
||||
"operator": "eq",
|
||||
"value": ["string", "string", "string"],
|
||||
},
|
||||
{
|
||||
"key": "created_at",
|
||||
"operator": "eq",
|
||||
"value": ["string", "string", "string"],
|
||||
},
|
||||
"value": ["string"],
|
||||
}
|
||||
],
|
||||
name="name",
|
||||
)
|
||||
|
|
@ -61,18 +51,8 @@ class TestDatasets:
|
|||
{
|
||||
"key": "created_at",
|
||||
"operator": "eq",
|
||||
"value": ["string", "string", "string"],
|
||||
},
|
||||
{
|
||||
"key": "created_at",
|
||||
"operator": "eq",
|
||||
"value": ["string", "string", "string"],
|
||||
},
|
||||
{
|
||||
"key": "created_at",
|
||||
"operator": "eq",
|
||||
"value": ["string", "string", "string"],
|
||||
},
|
||||
"value": ["string"],
|
||||
}
|
||||
],
|
||||
name="name",
|
||||
)
|
||||
|
|
@ -92,18 +72,8 @@ class TestDatasets:
|
|||
{
|
||||
"key": "created_at",
|
||||
"operator": "eq",
|
||||
"value": ["string", "string", "string"],
|
||||
},
|
||||
{
|
||||
"key": "created_at",
|
||||
"operator": "eq",
|
||||
"value": ["string", "string", "string"],
|
||||
},
|
||||
{
|
||||
"key": "created_at",
|
||||
"operator": "eq",
|
||||
"value": ["string", "string", "string"],
|
||||
},
|
||||
"value": ["string"],
|
||||
}
|
||||
],
|
||||
name="name",
|
||||
) as response:
|
||||
|
|
@ -126,18 +96,8 @@ class TestDatasets:
|
|||
{
|
||||
"key": "created_at",
|
||||
"operator": "eq",
|
||||
"value": ["string", "string", "string"],
|
||||
},
|
||||
{
|
||||
"key": "created_at",
|
||||
"operator": "eq",
|
||||
"value": ["string", "string", "string"],
|
||||
},
|
||||
{
|
||||
"key": "created_at",
|
||||
"operator": "eq",
|
||||
"value": ["string", "string", "string"],
|
||||
},
|
||||
"value": ["string"],
|
||||
}
|
||||
],
|
||||
name="name",
|
||||
)
|
||||
|
|
@ -151,18 +111,8 @@ class TestDatasets:
|
|||
{
|
||||
"key": "created_at",
|
||||
"operator": "eq",
|
||||
"value": ["string", "string", "string"],
|
||||
},
|
||||
{
|
||||
"key": "created_at",
|
||||
"operator": "eq",
|
||||
"value": ["string", "string", "string"],
|
||||
},
|
||||
{
|
||||
"key": "created_at",
|
||||
"operator": "eq",
|
||||
"value": ["string", "string", "string"],
|
||||
},
|
||||
"value": ["string"],
|
||||
}
|
||||
],
|
||||
name="name",
|
||||
)
|
||||
|
|
@ -178,18 +128,8 @@ class TestDatasets:
|
|||
{
|
||||
"key": "created_at",
|
||||
"operator": "eq",
|
||||
"value": ["string", "string", "string"],
|
||||
},
|
||||
{
|
||||
"key": "created_at",
|
||||
"operator": "eq",
|
||||
"value": ["string", "string", "string"],
|
||||
},
|
||||
{
|
||||
"key": "created_at",
|
||||
"operator": "eq",
|
||||
"value": ["string", "string", "string"],
|
||||
},
|
||||
"value": ["string"],
|
||||
}
|
||||
],
|
||||
name="name",
|
||||
)
|
||||
|
|
@ -206,18 +146,8 @@ class TestDatasets:
|
|||
{
|
||||
"key": "created_at",
|
||||
"operator": "eq",
|
||||
"value": ["string", "string", "string"],
|
||||
},
|
||||
{
|
||||
"key": "created_at",
|
||||
"operator": "eq",
|
||||
"value": ["string", "string", "string"],
|
||||
},
|
||||
{
|
||||
"key": "created_at",
|
||||
"operator": "eq",
|
||||
"value": ["string", "string", "string"],
|
||||
},
|
||||
"value": ["string"],
|
||||
}
|
||||
],
|
||||
name="name",
|
||||
)
|
||||
|
|
@ -238,18 +168,8 @@ class TestDatasets:
|
|||
{
|
||||
"key": "created_at",
|
||||
"operator": "eq",
|
||||
"value": ["string", "string", "string"],
|
||||
},
|
||||
{
|
||||
"key": "created_at",
|
||||
"operator": "eq",
|
||||
"value": ["string", "string", "string"],
|
||||
},
|
||||
{
|
||||
"key": "created_at",
|
||||
"operator": "eq",
|
||||
"value": ["string", "string", "string"],
|
||||
},
|
||||
"value": ["string"],
|
||||
}
|
||||
],
|
||||
name="name",
|
||||
) as response:
|
||||
|
|
@ -273,18 +193,8 @@ class TestDatasets:
|
|||
{
|
||||
"key": "created_at",
|
||||
"operator": "eq",
|
||||
"value": ["string", "string", "string"],
|
||||
},
|
||||
{
|
||||
"key": "created_at",
|
||||
"operator": "eq",
|
||||
"value": ["string", "string", "string"],
|
||||
},
|
||||
{
|
||||
"key": "created_at",
|
||||
"operator": "eq",
|
||||
"value": ["string", "string", "string"],
|
||||
},
|
||||
"value": ["string"],
|
||||
}
|
||||
],
|
||||
name="name",
|
||||
)
|
||||
|
|
@ -299,18 +209,8 @@ class TestDatasets:
|
|||
{
|
||||
"key": "created_at",
|
||||
"operator": "eq",
|
||||
"value": ["string", "string", "string"],
|
||||
},
|
||||
{
|
||||
"key": "created_at",
|
||||
"operator": "eq",
|
||||
"value": ["string", "string", "string"],
|
||||
},
|
||||
{
|
||||
"key": "created_at",
|
||||
"operator": "eq",
|
||||
"value": ["string", "string", "string"],
|
||||
},
|
||||
"value": ["string"],
|
||||
}
|
||||
],
|
||||
name="name",
|
||||
)
|
||||
|
|
@ -325,18 +225,8 @@ class TestDatasets:
|
|||
{
|
||||
"key": "created_at",
|
||||
"operator": "eq",
|
||||
"value": ["string", "string", "string"],
|
||||
},
|
||||
{
|
||||
"key": "created_at",
|
||||
"operator": "eq",
|
||||
"value": ["string", "string", "string"],
|
||||
},
|
||||
{
|
||||
"key": "created_at",
|
||||
"operator": "eq",
|
||||
"value": ["string", "string", "string"],
|
||||
},
|
||||
"value": ["string"],
|
||||
}
|
||||
],
|
||||
name="name",
|
||||
)
|
||||
|
|
@ -538,18 +428,8 @@ class TestAsyncDatasets:
|
|||
{
|
||||
"key": "created_at",
|
||||
"operator": "eq",
|
||||
"value": ["string", "string", "string"],
|
||||
},
|
||||
{
|
||||
"key": "created_at",
|
||||
"operator": "eq",
|
||||
"value": ["string", "string", "string"],
|
||||
},
|
||||
{
|
||||
"key": "created_at",
|
||||
"operator": "eq",
|
||||
"value": ["string", "string", "string"],
|
||||
},
|
||||
"value": ["string"],
|
||||
}
|
||||
],
|
||||
name="name",
|
||||
)
|
||||
|
|
@ -565,18 +445,8 @@ class TestAsyncDatasets:
|
|||
{
|
||||
"key": "created_at",
|
||||
"operator": "eq",
|
||||
"value": ["string", "string", "string"],
|
||||
},
|
||||
{
|
||||
"key": "created_at",
|
||||
"operator": "eq",
|
||||
"value": ["string", "string", "string"],
|
||||
},
|
||||
{
|
||||
"key": "created_at",
|
||||
"operator": "eq",
|
||||
"value": ["string", "string", "string"],
|
||||
},
|
||||
"value": ["string"],
|
||||
}
|
||||
],
|
||||
name="name",
|
||||
)
|
||||
|
|
@ -596,18 +466,8 @@ class TestAsyncDatasets:
|
|||
{
|
||||
"key": "created_at",
|
||||
"operator": "eq",
|
||||
"value": ["string", "string", "string"],
|
||||
},
|
||||
{
|
||||
"key": "created_at",
|
||||
"operator": "eq",
|
||||
"value": ["string", "string", "string"],
|
||||
},
|
||||
{
|
||||
"key": "created_at",
|
||||
"operator": "eq",
|
||||
"value": ["string", "string", "string"],
|
||||
},
|
||||
"value": ["string"],
|
||||
}
|
||||
],
|
||||
name="name",
|
||||
) as response:
|
||||
|
|
@ -630,18 +490,8 @@ class TestAsyncDatasets:
|
|||
{
|
||||
"key": "created_at",
|
||||
"operator": "eq",
|
||||
"value": ["string", "string", "string"],
|
||||
},
|
||||
{
|
||||
"key": "created_at",
|
||||
"operator": "eq",
|
||||
"value": ["string", "string", "string"],
|
||||
},
|
||||
{
|
||||
"key": "created_at",
|
||||
"operator": "eq",
|
||||
"value": ["string", "string", "string"],
|
||||
},
|
||||
"value": ["string"],
|
||||
}
|
||||
],
|
||||
name="name",
|
||||
)
|
||||
|
|
@ -655,18 +505,8 @@ class TestAsyncDatasets:
|
|||
{
|
||||
"key": "created_at",
|
||||
"operator": "eq",
|
||||
"value": ["string", "string", "string"],
|
||||
},
|
||||
{
|
||||
"key": "created_at",
|
||||
"operator": "eq",
|
||||
"value": ["string", "string", "string"],
|
||||
},
|
||||
{
|
||||
"key": "created_at",
|
||||
"operator": "eq",
|
||||
"value": ["string", "string", "string"],
|
||||
},
|
||||
"value": ["string"],
|
||||
}
|
||||
],
|
||||
name="name",
|
||||
)
|
||||
|
|
@ -682,18 +522,8 @@ class TestAsyncDatasets:
|
|||
{
|
||||
"key": "created_at",
|
||||
"operator": "eq",
|
||||
"value": ["string", "string", "string"],
|
||||
},
|
||||
{
|
||||
"key": "created_at",
|
||||
"operator": "eq",
|
||||
"value": ["string", "string", "string"],
|
||||
},
|
||||
{
|
||||
"key": "created_at",
|
||||
"operator": "eq",
|
||||
"value": ["string", "string", "string"],
|
||||
},
|
||||
"value": ["string"],
|
||||
}
|
||||
],
|
||||
name="name",
|
||||
)
|
||||
|
|
@ -710,18 +540,8 @@ class TestAsyncDatasets:
|
|||
{
|
||||
"key": "created_at",
|
||||
"operator": "eq",
|
||||
"value": ["string", "string", "string"],
|
||||
},
|
||||
{
|
||||
"key": "created_at",
|
||||
"operator": "eq",
|
||||
"value": ["string", "string", "string"],
|
||||
},
|
||||
{
|
||||
"key": "created_at",
|
||||
"operator": "eq",
|
||||
"value": ["string", "string", "string"],
|
||||
},
|
||||
"value": ["string"],
|
||||
}
|
||||
],
|
||||
name="name",
|
||||
)
|
||||
|
|
@ -742,18 +562,8 @@ class TestAsyncDatasets:
|
|||
{
|
||||
"key": "created_at",
|
||||
"operator": "eq",
|
||||
"value": ["string", "string", "string"],
|
||||
},
|
||||
{
|
||||
"key": "created_at",
|
||||
"operator": "eq",
|
||||
"value": ["string", "string", "string"],
|
||||
},
|
||||
{
|
||||
"key": "created_at",
|
||||
"operator": "eq",
|
||||
"value": ["string", "string", "string"],
|
||||
},
|
||||
"value": ["string"],
|
||||
}
|
||||
],
|
||||
name="name",
|
||||
) as response:
|
||||
|
|
@ -777,18 +587,8 @@ class TestAsyncDatasets:
|
|||
{
|
||||
"key": "created_at",
|
||||
"operator": "eq",
|
||||
"value": ["string", "string", "string"],
|
||||
},
|
||||
{
|
||||
"key": "created_at",
|
||||
"operator": "eq",
|
||||
"value": ["string", "string", "string"],
|
||||
},
|
||||
{
|
||||
"key": "created_at",
|
||||
"operator": "eq",
|
||||
"value": ["string", "string", "string"],
|
||||
},
|
||||
"value": ["string"],
|
||||
}
|
||||
],
|
||||
name="name",
|
||||
)
|
||||
|
|
@ -803,18 +603,8 @@ class TestAsyncDatasets:
|
|||
{
|
||||
"key": "created_at",
|
||||
"operator": "eq",
|
||||
"value": ["string", "string", "string"],
|
||||
},
|
||||
{
|
||||
"key": "created_at",
|
||||
"operator": "eq",
|
||||
"value": ["string", "string", "string"],
|
||||
},
|
||||
{
|
||||
"key": "created_at",
|
||||
"operator": "eq",
|
||||
"value": ["string", "string", "string"],
|
||||
},
|
||||
"value": ["string"],
|
||||
}
|
||||
],
|
||||
name="name",
|
||||
)
|
||||
|
|
@ -829,18 +619,8 @@ class TestAsyncDatasets:
|
|||
{
|
||||
"key": "created_at",
|
||||
"operator": "eq",
|
||||
"value": ["string", "string", "string"],
|
||||
},
|
||||
{
|
||||
"key": "created_at",
|
||||
"operator": "eq",
|
||||
"value": ["string", "string", "string"],
|
||||
},
|
||||
{
|
||||
"key": "created_at",
|
||||
"operator": "eq",
|
||||
"value": ["string", "string", "string"],
|
||||
},
|
||||
"value": ["string"],
|
||||
}
|
||||
],
|
||||
name="name",
|
||||
)
|
||||
|
|
|
|||
|
|
@ -28,8 +28,8 @@ class TestEvaluations:
|
|||
evaluation = client.ai_gateway.evaluations.create(
|
||||
gateway_id="my-gateway",
|
||||
account_id="3ebbcb006d4d46d7bb6a8c7f14676cb0",
|
||||
dataset_ids=["string", "string", "string"],
|
||||
evaluation_type_ids=["string", "string", "string"],
|
||||
dataset_ids=["string"],
|
||||
evaluation_type_ids=["string"],
|
||||
name="name",
|
||||
)
|
||||
assert_matches_type(EvaluationCreateResponse, evaluation, path=["response"])
|
||||
|
|
@ -39,8 +39,8 @@ class TestEvaluations:
|
|||
response = client.ai_gateway.evaluations.with_raw_response.create(
|
||||
gateway_id="my-gateway",
|
||||
account_id="3ebbcb006d4d46d7bb6a8c7f14676cb0",
|
||||
dataset_ids=["string", "string", "string"],
|
||||
evaluation_type_ids=["string", "string", "string"],
|
||||
dataset_ids=["string"],
|
||||
evaluation_type_ids=["string"],
|
||||
name="name",
|
||||
)
|
||||
|
||||
|
|
@ -54,8 +54,8 @@ class TestEvaluations:
|
|||
with client.ai_gateway.evaluations.with_streaming_response.create(
|
||||
gateway_id="my-gateway",
|
||||
account_id="3ebbcb006d4d46d7bb6a8c7f14676cb0",
|
||||
dataset_ids=["string", "string", "string"],
|
||||
evaluation_type_ids=["string", "string", "string"],
|
||||
dataset_ids=["string"],
|
||||
evaluation_type_ids=["string"],
|
||||
name="name",
|
||||
) as response:
|
||||
assert not response.is_closed
|
||||
|
|
@ -72,8 +72,8 @@ class TestEvaluations:
|
|||
client.ai_gateway.evaluations.with_raw_response.create(
|
||||
gateway_id="my-gateway",
|
||||
account_id="",
|
||||
dataset_ids=["string", "string", "string"],
|
||||
evaluation_type_ids=["string", "string", "string"],
|
||||
dataset_ids=["string"],
|
||||
evaluation_type_ids=["string"],
|
||||
name="name",
|
||||
)
|
||||
|
||||
|
|
@ -81,8 +81,8 @@ class TestEvaluations:
|
|||
client.ai_gateway.evaluations.with_raw_response.create(
|
||||
gateway_id="",
|
||||
account_id="3ebbcb006d4d46d7bb6a8c7f14676cb0",
|
||||
dataset_ids=["string", "string", "string"],
|
||||
evaluation_type_ids=["string", "string", "string"],
|
||||
dataset_ids=["string"],
|
||||
evaluation_type_ids=["string"],
|
||||
name="name",
|
||||
)
|
||||
|
||||
|
|
@ -278,8 +278,8 @@ class TestAsyncEvaluations:
|
|||
evaluation = await async_client.ai_gateway.evaluations.create(
|
||||
gateway_id="my-gateway",
|
||||
account_id="3ebbcb006d4d46d7bb6a8c7f14676cb0",
|
||||
dataset_ids=["string", "string", "string"],
|
||||
evaluation_type_ids=["string", "string", "string"],
|
||||
dataset_ids=["string"],
|
||||
evaluation_type_ids=["string"],
|
||||
name="name",
|
||||
)
|
||||
assert_matches_type(EvaluationCreateResponse, evaluation, path=["response"])
|
||||
|
|
@ -289,8 +289,8 @@ class TestAsyncEvaluations:
|
|||
response = await async_client.ai_gateway.evaluations.with_raw_response.create(
|
||||
gateway_id="my-gateway",
|
||||
account_id="3ebbcb006d4d46d7bb6a8c7f14676cb0",
|
||||
dataset_ids=["string", "string", "string"],
|
||||
evaluation_type_ids=["string", "string", "string"],
|
||||
dataset_ids=["string"],
|
||||
evaluation_type_ids=["string"],
|
||||
name="name",
|
||||
)
|
||||
|
||||
|
|
@ -304,8 +304,8 @@ class TestAsyncEvaluations:
|
|||
async with async_client.ai_gateway.evaluations.with_streaming_response.create(
|
||||
gateway_id="my-gateway",
|
||||
account_id="3ebbcb006d4d46d7bb6a8c7f14676cb0",
|
||||
dataset_ids=["string", "string", "string"],
|
||||
evaluation_type_ids=["string", "string", "string"],
|
||||
dataset_ids=["string"],
|
||||
evaluation_type_ids=["string"],
|
||||
name="name",
|
||||
) as response:
|
||||
assert not response.is_closed
|
||||
|
|
@ -322,8 +322,8 @@ class TestAsyncEvaluations:
|
|||
await async_client.ai_gateway.evaluations.with_raw_response.create(
|
||||
gateway_id="my-gateway",
|
||||
account_id="",
|
||||
dataset_ids=["string", "string", "string"],
|
||||
evaluation_type_ids=["string", "string", "string"],
|
||||
dataset_ids=["string"],
|
||||
evaluation_type_ids=["string"],
|
||||
name="name",
|
||||
)
|
||||
|
||||
|
|
@ -331,8 +331,8 @@ class TestAsyncEvaluations:
|
|||
await async_client.ai_gateway.evaluations.with_raw_response.create(
|
||||
gateway_id="",
|
||||
account_id="3ebbcb006d4d46d7bb6a8c7f14676cb0",
|
||||
dataset_ids=["string", "string", "string"],
|
||||
evaluation_type_ids=["string", "string", "string"],
|
||||
dataset_ids=["string"],
|
||||
evaluation_type_ids=["string"],
|
||||
name="name",
|
||||
)
|
||||
|
||||
|
|
|
|||
|
|
@ -44,18 +44,8 @@ class TestLogs:
|
|||
{
|
||||
"key": "created_at",
|
||||
"operator": "eq",
|
||||
"value": ["string", "string", "string"],
|
||||
},
|
||||
{
|
||||
"key": "created_at",
|
||||
"operator": "eq",
|
||||
"value": ["string", "string", "string"],
|
||||
},
|
||||
{
|
||||
"key": "created_at",
|
||||
"operator": "eq",
|
||||
"value": ["string", "string", "string"],
|
||||
},
|
||||
"value": ["string"],
|
||||
}
|
||||
],
|
||||
max_cost=0,
|
||||
max_duration=0,
|
||||
|
|
@ -140,18 +130,8 @@ class TestLogs:
|
|||
{
|
||||
"key": "created_at",
|
||||
"operator": "eq",
|
||||
"value": ["string", "string", "string"],
|
||||
},
|
||||
{
|
||||
"key": "created_at",
|
||||
"operator": "eq",
|
||||
"value": ["string", "string", "string"],
|
||||
},
|
||||
{
|
||||
"key": "created_at",
|
||||
"operator": "eq",
|
||||
"value": ["string", "string", "string"],
|
||||
},
|
||||
"value": ["string"],
|
||||
}
|
||||
],
|
||||
limit=1,
|
||||
order_by="created_at",
|
||||
|
|
@ -476,18 +456,8 @@ class TestAsyncLogs:
|
|||
{
|
||||
"key": "created_at",
|
||||
"operator": "eq",
|
||||
"value": ["string", "string", "string"],
|
||||
},
|
||||
{
|
||||
"key": "created_at",
|
||||
"operator": "eq",
|
||||
"value": ["string", "string", "string"],
|
||||
},
|
||||
{
|
||||
"key": "created_at",
|
||||
"operator": "eq",
|
||||
"value": ["string", "string", "string"],
|
||||
},
|
||||
"value": ["string"],
|
||||
}
|
||||
],
|
||||
max_cost=0,
|
||||
max_duration=0,
|
||||
|
|
@ -572,18 +542,8 @@ class TestAsyncLogs:
|
|||
{
|
||||
"key": "created_at",
|
||||
"operator": "eq",
|
||||
"value": ["string", "string", "string"],
|
||||
},
|
||||
{
|
||||
"key": "created_at",
|
||||
"operator": "eq",
|
||||
"value": ["string", "string", "string"],
|
||||
},
|
||||
{
|
||||
"key": "created_at",
|
||||
"operator": "eq",
|
||||
"value": ["string", "string", "string"],
|
||||
},
|
||||
"value": ["string"],
|
||||
}
|
||||
],
|
||||
limit=1,
|
||||
order_by="created_at",
|
||||
|
|
|
|||
|
|
@ -59,47 +59,47 @@ class TestPolicies:
|
|||
alert_interval="30m",
|
||||
description="Something describing the policy.",
|
||||
filters={
|
||||
"actions": ["string", "string", "string"],
|
||||
"affected_asns": ["string", "string", "string"],
|
||||
"affected_components": ["string", "string", "string"],
|
||||
"affected_locations": ["string", "string", "string"],
|
||||
"airport_code": ["string", "string", "string"],
|
||||
"alert_trigger_preferences": ["string", "string", "string"],
|
||||
"alert_trigger_preferences_value": ["string", "string", "string"],
|
||||
"enabled": ["string", "string", "string"],
|
||||
"environment": ["string", "string", "string"],
|
||||
"event": ["string", "string", "string"],
|
||||
"event_source": ["string", "string", "string"],
|
||||
"event_type": ["string", "string", "string"],
|
||||
"group_by": ["string", "string", "string"],
|
||||
"health_check_id": ["string", "string", "string"],
|
||||
"incident_impact": ["INCIDENT_IMPACT_NONE", "INCIDENT_IMPACT_MINOR", "INCIDENT_IMPACT_MAJOR"],
|
||||
"input_id": ["string", "string", "string"],
|
||||
"limit": ["string", "string", "string"],
|
||||
"logo_tag": ["string", "string", "string"],
|
||||
"megabits_per_second": ["string", "string", "string"],
|
||||
"new_health": ["string", "string", "string"],
|
||||
"new_status": ["string", "string", "string"],
|
||||
"packets_per_second": ["string", "string", "string"],
|
||||
"pool_id": ["string", "string", "string"],
|
||||
"pop_name": ["string", "string", "string"],
|
||||
"product": ["string", "string", "string"],
|
||||
"project_id": ["string", "string", "string"],
|
||||
"protocol": ["string", "string", "string"],
|
||||
"query_tag": ["string", "string", "string"],
|
||||
"requests_per_second": ["string", "string", "string"],
|
||||
"selectors": ["string", "string", "string"],
|
||||
"services": ["string", "string", "string"],
|
||||
"actions": ["string"],
|
||||
"affected_asns": ["string"],
|
||||
"affected_components": ["string"],
|
||||
"affected_locations": ["string"],
|
||||
"airport_code": ["string"],
|
||||
"alert_trigger_preferences": ["string"],
|
||||
"alert_trigger_preferences_value": ["string"],
|
||||
"enabled": ["string"],
|
||||
"environment": ["string"],
|
||||
"event": ["string"],
|
||||
"event_source": ["string"],
|
||||
"event_type": ["string"],
|
||||
"group_by": ["string"],
|
||||
"health_check_id": ["string"],
|
||||
"incident_impact": ["INCIDENT_IMPACT_NONE"],
|
||||
"input_id": ["string"],
|
||||
"limit": ["string"],
|
||||
"logo_tag": ["string"],
|
||||
"megabits_per_second": ["string"],
|
||||
"new_health": ["string"],
|
||||
"new_status": ["string"],
|
||||
"packets_per_second": ["string"],
|
||||
"pool_id": ["string"],
|
||||
"pop_name": ["string"],
|
||||
"product": ["string"],
|
||||
"project_id": ["string"],
|
||||
"protocol": ["string"],
|
||||
"query_tag": ["string"],
|
||||
"requests_per_second": ["string"],
|
||||
"selectors": ["string"],
|
||||
"services": ["string"],
|
||||
"slo": ["99.9"],
|
||||
"status": ["string", "string", "string"],
|
||||
"target_hostname": ["string", "string", "string"],
|
||||
"target_ip": ["string", "string", "string"],
|
||||
"target_zone_name": ["string", "string", "string"],
|
||||
"status": ["string"],
|
||||
"target_hostname": ["string"],
|
||||
"target_ip": ["string"],
|
||||
"target_zone_name": ["string"],
|
||||
"traffic_exclusions": ["security_events"],
|
||||
"tunnel_id": ["string", "string", "string"],
|
||||
"tunnel_name": ["string", "string", "string"],
|
||||
"where": ["string", "string", "string"],
|
||||
"zones": ["string", "string", "string"],
|
||||
"tunnel_id": ["string"],
|
||||
"tunnel_name": ["string"],
|
||||
"where": ["string"],
|
||||
"zones": ["string"],
|
||||
},
|
||||
)
|
||||
assert_matches_type(Optional[PolicyCreateResponse], policy, path=["response"])
|
||||
|
|
@ -192,47 +192,47 @@ class TestPolicies:
|
|||
description="Something describing the policy.",
|
||||
enabled=True,
|
||||
filters={
|
||||
"actions": ["string", "string", "string"],
|
||||
"affected_asns": ["string", "string", "string"],
|
||||
"affected_components": ["string", "string", "string"],
|
||||
"affected_locations": ["string", "string", "string"],
|
||||
"airport_code": ["string", "string", "string"],
|
||||
"alert_trigger_preferences": ["string", "string", "string"],
|
||||
"alert_trigger_preferences_value": ["string", "string", "string"],
|
||||
"enabled": ["string", "string", "string"],
|
||||
"environment": ["string", "string", "string"],
|
||||
"event": ["string", "string", "string"],
|
||||
"event_source": ["string", "string", "string"],
|
||||
"event_type": ["string", "string", "string"],
|
||||
"group_by": ["string", "string", "string"],
|
||||
"health_check_id": ["string", "string", "string"],
|
||||
"incident_impact": ["INCIDENT_IMPACT_NONE", "INCIDENT_IMPACT_MINOR", "INCIDENT_IMPACT_MAJOR"],
|
||||
"input_id": ["string", "string", "string"],
|
||||
"limit": ["string", "string", "string"],
|
||||
"logo_tag": ["string", "string", "string"],
|
||||
"megabits_per_second": ["string", "string", "string"],
|
||||
"new_health": ["string", "string", "string"],
|
||||
"new_status": ["string", "string", "string"],
|
||||
"packets_per_second": ["string", "string", "string"],
|
||||
"pool_id": ["string", "string", "string"],
|
||||
"pop_name": ["string", "string", "string"],
|
||||
"product": ["string", "string", "string"],
|
||||
"project_id": ["string", "string", "string"],
|
||||
"protocol": ["string", "string", "string"],
|
||||
"query_tag": ["string", "string", "string"],
|
||||
"requests_per_second": ["string", "string", "string"],
|
||||
"selectors": ["string", "string", "string"],
|
||||
"services": ["string", "string", "string"],
|
||||
"actions": ["string"],
|
||||
"affected_asns": ["string"],
|
||||
"affected_components": ["string"],
|
||||
"affected_locations": ["string"],
|
||||
"airport_code": ["string"],
|
||||
"alert_trigger_preferences": ["string"],
|
||||
"alert_trigger_preferences_value": ["string"],
|
||||
"enabled": ["string"],
|
||||
"environment": ["string"],
|
||||
"event": ["string"],
|
||||
"event_source": ["string"],
|
||||
"event_type": ["string"],
|
||||
"group_by": ["string"],
|
||||
"health_check_id": ["string"],
|
||||
"incident_impact": ["INCIDENT_IMPACT_NONE"],
|
||||
"input_id": ["string"],
|
||||
"limit": ["string"],
|
||||
"logo_tag": ["string"],
|
||||
"megabits_per_second": ["string"],
|
||||
"new_health": ["string"],
|
||||
"new_status": ["string"],
|
||||
"packets_per_second": ["string"],
|
||||
"pool_id": ["string"],
|
||||
"pop_name": ["string"],
|
||||
"product": ["string"],
|
||||
"project_id": ["string"],
|
||||
"protocol": ["string"],
|
||||
"query_tag": ["string"],
|
||||
"requests_per_second": ["string"],
|
||||
"selectors": ["string"],
|
||||
"services": ["string"],
|
||||
"slo": ["99.9"],
|
||||
"status": ["string", "string", "string"],
|
||||
"target_hostname": ["string", "string", "string"],
|
||||
"target_ip": ["string", "string", "string"],
|
||||
"target_zone_name": ["string", "string", "string"],
|
||||
"status": ["string"],
|
||||
"target_hostname": ["string"],
|
||||
"target_ip": ["string"],
|
||||
"target_zone_name": ["string"],
|
||||
"traffic_exclusions": ["security_events"],
|
||||
"tunnel_id": ["string", "string", "string"],
|
||||
"tunnel_name": ["string", "string", "string"],
|
||||
"where": ["string", "string", "string"],
|
||||
"zones": ["string", "string", "string"],
|
||||
"tunnel_id": ["string"],
|
||||
"tunnel_name": ["string"],
|
||||
"where": ["string"],
|
||||
"zones": ["string"],
|
||||
},
|
||||
mechanisms={
|
||||
"email": [{"id": "test@example.com"}],
|
||||
|
|
@ -478,47 +478,47 @@ class TestAsyncPolicies:
|
|||
alert_interval="30m",
|
||||
description="Something describing the policy.",
|
||||
filters={
|
||||
"actions": ["string", "string", "string"],
|
||||
"affected_asns": ["string", "string", "string"],
|
||||
"affected_components": ["string", "string", "string"],
|
||||
"affected_locations": ["string", "string", "string"],
|
||||
"airport_code": ["string", "string", "string"],
|
||||
"alert_trigger_preferences": ["string", "string", "string"],
|
||||
"alert_trigger_preferences_value": ["string", "string", "string"],
|
||||
"enabled": ["string", "string", "string"],
|
||||
"environment": ["string", "string", "string"],
|
||||
"event": ["string", "string", "string"],
|
||||
"event_source": ["string", "string", "string"],
|
||||
"event_type": ["string", "string", "string"],
|
||||
"group_by": ["string", "string", "string"],
|
||||
"health_check_id": ["string", "string", "string"],
|
||||
"incident_impact": ["INCIDENT_IMPACT_NONE", "INCIDENT_IMPACT_MINOR", "INCIDENT_IMPACT_MAJOR"],
|
||||
"input_id": ["string", "string", "string"],
|
||||
"limit": ["string", "string", "string"],
|
||||
"logo_tag": ["string", "string", "string"],
|
||||
"megabits_per_second": ["string", "string", "string"],
|
||||
"new_health": ["string", "string", "string"],
|
||||
"new_status": ["string", "string", "string"],
|
||||
"packets_per_second": ["string", "string", "string"],
|
||||
"pool_id": ["string", "string", "string"],
|
||||
"pop_name": ["string", "string", "string"],
|
||||
"product": ["string", "string", "string"],
|
||||
"project_id": ["string", "string", "string"],
|
||||
"protocol": ["string", "string", "string"],
|
||||
"query_tag": ["string", "string", "string"],
|
||||
"requests_per_second": ["string", "string", "string"],
|
||||
"selectors": ["string", "string", "string"],
|
||||
"services": ["string", "string", "string"],
|
||||
"actions": ["string"],
|
||||
"affected_asns": ["string"],
|
||||
"affected_components": ["string"],
|
||||
"affected_locations": ["string"],
|
||||
"airport_code": ["string"],
|
||||
"alert_trigger_preferences": ["string"],
|
||||
"alert_trigger_preferences_value": ["string"],
|
||||
"enabled": ["string"],
|
||||
"environment": ["string"],
|
||||
"event": ["string"],
|
||||
"event_source": ["string"],
|
||||
"event_type": ["string"],
|
||||
"group_by": ["string"],
|
||||
"health_check_id": ["string"],
|
||||
"incident_impact": ["INCIDENT_IMPACT_NONE"],
|
||||
"input_id": ["string"],
|
||||
"limit": ["string"],
|
||||
"logo_tag": ["string"],
|
||||
"megabits_per_second": ["string"],
|
||||
"new_health": ["string"],
|
||||
"new_status": ["string"],
|
||||
"packets_per_second": ["string"],
|
||||
"pool_id": ["string"],
|
||||
"pop_name": ["string"],
|
||||
"product": ["string"],
|
||||
"project_id": ["string"],
|
||||
"protocol": ["string"],
|
||||
"query_tag": ["string"],
|
||||
"requests_per_second": ["string"],
|
||||
"selectors": ["string"],
|
||||
"services": ["string"],
|
||||
"slo": ["99.9"],
|
||||
"status": ["string", "string", "string"],
|
||||
"target_hostname": ["string", "string", "string"],
|
||||
"target_ip": ["string", "string", "string"],
|
||||
"target_zone_name": ["string", "string", "string"],
|
||||
"status": ["string"],
|
||||
"target_hostname": ["string"],
|
||||
"target_ip": ["string"],
|
||||
"target_zone_name": ["string"],
|
||||
"traffic_exclusions": ["security_events"],
|
||||
"tunnel_id": ["string", "string", "string"],
|
||||
"tunnel_name": ["string", "string", "string"],
|
||||
"where": ["string", "string", "string"],
|
||||
"zones": ["string", "string", "string"],
|
||||
"tunnel_id": ["string"],
|
||||
"tunnel_name": ["string"],
|
||||
"where": ["string"],
|
||||
"zones": ["string"],
|
||||
},
|
||||
)
|
||||
assert_matches_type(Optional[PolicyCreateResponse], policy, path=["response"])
|
||||
|
|
@ -611,47 +611,47 @@ class TestAsyncPolicies:
|
|||
description="Something describing the policy.",
|
||||
enabled=True,
|
||||
filters={
|
||||
"actions": ["string", "string", "string"],
|
||||
"affected_asns": ["string", "string", "string"],
|
||||
"affected_components": ["string", "string", "string"],
|
||||
"affected_locations": ["string", "string", "string"],
|
||||
"airport_code": ["string", "string", "string"],
|
||||
"alert_trigger_preferences": ["string", "string", "string"],
|
||||
"alert_trigger_preferences_value": ["string", "string", "string"],
|
||||
"enabled": ["string", "string", "string"],
|
||||
"environment": ["string", "string", "string"],
|
||||
"event": ["string", "string", "string"],
|
||||
"event_source": ["string", "string", "string"],
|
||||
"event_type": ["string", "string", "string"],
|
||||
"group_by": ["string", "string", "string"],
|
||||
"health_check_id": ["string", "string", "string"],
|
||||
"incident_impact": ["INCIDENT_IMPACT_NONE", "INCIDENT_IMPACT_MINOR", "INCIDENT_IMPACT_MAJOR"],
|
||||
"input_id": ["string", "string", "string"],
|
||||
"limit": ["string", "string", "string"],
|
||||
"logo_tag": ["string", "string", "string"],
|
||||
"megabits_per_second": ["string", "string", "string"],
|
||||
"new_health": ["string", "string", "string"],
|
||||
"new_status": ["string", "string", "string"],
|
||||
"packets_per_second": ["string", "string", "string"],
|
||||
"pool_id": ["string", "string", "string"],
|
||||
"pop_name": ["string", "string", "string"],
|
||||
"product": ["string", "string", "string"],
|
||||
"project_id": ["string", "string", "string"],
|
||||
"protocol": ["string", "string", "string"],
|
||||
"query_tag": ["string", "string", "string"],
|
||||
"requests_per_second": ["string", "string", "string"],
|
||||
"selectors": ["string", "string", "string"],
|
||||
"services": ["string", "string", "string"],
|
||||
"actions": ["string"],
|
||||
"affected_asns": ["string"],
|
||||
"affected_components": ["string"],
|
||||
"affected_locations": ["string"],
|
||||
"airport_code": ["string"],
|
||||
"alert_trigger_preferences": ["string"],
|
||||
"alert_trigger_preferences_value": ["string"],
|
||||
"enabled": ["string"],
|
||||
"environment": ["string"],
|
||||
"event": ["string"],
|
||||
"event_source": ["string"],
|
||||
"event_type": ["string"],
|
||||
"group_by": ["string"],
|
||||
"health_check_id": ["string"],
|
||||
"incident_impact": ["INCIDENT_IMPACT_NONE"],
|
||||
"input_id": ["string"],
|
||||
"limit": ["string"],
|
||||
"logo_tag": ["string"],
|
||||
"megabits_per_second": ["string"],
|
||||
"new_health": ["string"],
|
||||
"new_status": ["string"],
|
||||
"packets_per_second": ["string"],
|
||||
"pool_id": ["string"],
|
||||
"pop_name": ["string"],
|
||||
"product": ["string"],
|
||||
"project_id": ["string"],
|
||||
"protocol": ["string"],
|
||||
"query_tag": ["string"],
|
||||
"requests_per_second": ["string"],
|
||||
"selectors": ["string"],
|
||||
"services": ["string"],
|
||||
"slo": ["99.9"],
|
||||
"status": ["string", "string", "string"],
|
||||
"target_hostname": ["string", "string", "string"],
|
||||
"target_ip": ["string", "string", "string"],
|
||||
"target_zone_name": ["string", "string", "string"],
|
||||
"status": ["string"],
|
||||
"target_hostname": ["string"],
|
||||
"target_ip": ["string"],
|
||||
"target_zone_name": ["string"],
|
||||
"traffic_exclusions": ["security_events"],
|
||||
"tunnel_id": ["string", "string", "string"],
|
||||
"tunnel_name": ["string", "string", "string"],
|
||||
"where": ["string", "string", "string"],
|
||||
"zones": ["string", "string", "string"],
|
||||
"tunnel_id": ["string"],
|
||||
"tunnel_name": ["string"],
|
||||
"where": ["string"],
|
||||
"zones": ["string"],
|
||||
},
|
||||
mechanisms={
|
||||
"email": [{"id": "test@example.com"}],
|
||||
|
|
|
|||
|
|
@ -32,17 +32,7 @@ class TestOperations:
|
|||
"endpoint": "/api/v1/users/{var1}",
|
||||
"host": "www.example.com",
|
||||
"method": "GET",
|
||||
},
|
||||
{
|
||||
"endpoint": "/api/v1/users/{var1}",
|
||||
"host": "www.example.com",
|
||||
"method": "GET",
|
||||
},
|
||||
{
|
||||
"endpoint": "/api/v1/users/{var1}",
|
||||
"host": "www.example.com",
|
||||
"method": "GET",
|
||||
},
|
||||
}
|
||||
],
|
||||
)
|
||||
assert_matches_type(OperationCreateResponse, operation, path=["response"])
|
||||
|
|
@ -56,17 +46,7 @@ class TestOperations:
|
|||
"endpoint": "/api/v1/users/{var1}",
|
||||
"host": "www.example.com",
|
||||
"method": "GET",
|
||||
},
|
||||
{
|
||||
"endpoint": "/api/v1/users/{var1}",
|
||||
"host": "www.example.com",
|
||||
"method": "GET",
|
||||
},
|
||||
{
|
||||
"endpoint": "/api/v1/users/{var1}",
|
||||
"host": "www.example.com",
|
||||
"method": "GET",
|
||||
},
|
||||
}
|
||||
],
|
||||
)
|
||||
|
||||
|
|
@ -84,17 +64,7 @@ class TestOperations:
|
|||
"endpoint": "/api/v1/users/{var1}",
|
||||
"host": "www.example.com",
|
||||
"method": "GET",
|
||||
},
|
||||
{
|
||||
"endpoint": "/api/v1/users/{var1}",
|
||||
"host": "www.example.com",
|
||||
"method": "GET",
|
||||
},
|
||||
{
|
||||
"endpoint": "/api/v1/users/{var1}",
|
||||
"host": "www.example.com",
|
||||
"method": "GET",
|
||||
},
|
||||
}
|
||||
],
|
||||
) as response:
|
||||
assert not response.is_closed
|
||||
|
|
@ -115,17 +85,7 @@ class TestOperations:
|
|||
"endpoint": "/api/v1/users/{var1}",
|
||||
"host": "www.example.com",
|
||||
"method": "GET",
|
||||
},
|
||||
{
|
||||
"endpoint": "/api/v1/users/{var1}",
|
||||
"host": "www.example.com",
|
||||
"method": "GET",
|
||||
},
|
||||
{
|
||||
"endpoint": "/api/v1/users/{var1}",
|
||||
"host": "www.example.com",
|
||||
"method": "GET",
|
||||
},
|
||||
}
|
||||
],
|
||||
)
|
||||
|
||||
|
|
@ -300,17 +260,7 @@ class TestAsyncOperations:
|
|||
"endpoint": "/api/v1/users/{var1}",
|
||||
"host": "www.example.com",
|
||||
"method": "GET",
|
||||
},
|
||||
{
|
||||
"endpoint": "/api/v1/users/{var1}",
|
||||
"host": "www.example.com",
|
||||
"method": "GET",
|
||||
},
|
||||
{
|
||||
"endpoint": "/api/v1/users/{var1}",
|
||||
"host": "www.example.com",
|
||||
"method": "GET",
|
||||
},
|
||||
}
|
||||
],
|
||||
)
|
||||
assert_matches_type(OperationCreateResponse, operation, path=["response"])
|
||||
|
|
@ -324,17 +274,7 @@ class TestAsyncOperations:
|
|||
"endpoint": "/api/v1/users/{var1}",
|
||||
"host": "www.example.com",
|
||||
"method": "GET",
|
||||
},
|
||||
{
|
||||
"endpoint": "/api/v1/users/{var1}",
|
||||
"host": "www.example.com",
|
||||
"method": "GET",
|
||||
},
|
||||
{
|
||||
"endpoint": "/api/v1/users/{var1}",
|
||||
"host": "www.example.com",
|
||||
"method": "GET",
|
||||
},
|
||||
}
|
||||
],
|
||||
)
|
||||
|
||||
|
|
@ -352,17 +292,7 @@ class TestAsyncOperations:
|
|||
"endpoint": "/api/v1/users/{var1}",
|
||||
"host": "www.example.com",
|
||||
"method": "GET",
|
||||
},
|
||||
{
|
||||
"endpoint": "/api/v1/users/{var1}",
|
||||
"host": "www.example.com",
|
||||
"method": "GET",
|
||||
},
|
||||
{
|
||||
"endpoint": "/api/v1/users/{var1}",
|
||||
"host": "www.example.com",
|
||||
"method": "GET",
|
||||
},
|
||||
}
|
||||
],
|
||||
) as response:
|
||||
assert not response.is_closed
|
||||
|
|
@ -383,17 +313,7 @@ class TestAsyncOperations:
|
|||
"endpoint": "/api/v1/users/{var1}",
|
||||
"host": "www.example.com",
|
||||
"method": "GET",
|
||||
},
|
||||
{
|
||||
"endpoint": "/api/v1/users/{var1}",
|
||||
"host": "www.example.com",
|
||||
"method": "GET",
|
||||
},
|
||||
{
|
||||
"endpoint": "/api/v1/users/{var1}",
|
||||
"host": "www.example.com",
|
||||
"method": "GET",
|
||||
},
|
||||
}
|
||||
],
|
||||
)
|
||||
|
||||
|
|
|
|||
|
|
@ -31,7 +31,7 @@ class TestHostnameAssociations:
|
|||
def test_method_update_with_all_params(self, client: Cloudflare) -> None:
|
||||
hostname_association = client.certificate_authorities.hostname_associations.update(
|
||||
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
|
||||
hostnames=["api.example.com", "api.example.com", "api.example.com"],
|
||||
hostnames=["api.example.com"],
|
||||
mtls_certificate_id="xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
|
||||
)
|
||||
assert_matches_type(Optional[HostnameAssociationUpdateResponse], hostname_association, path=["response"])
|
||||
|
|
@ -128,7 +128,7 @@ class TestAsyncHostnameAssociations:
|
|||
async def test_method_update_with_all_params(self, async_client: AsyncCloudflare) -> None:
|
||||
hostname_association = await async_client.certificate_authorities.hostname_associations.update(
|
||||
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
|
||||
hostnames=["api.example.com", "api.example.com", "api.example.com"],
|
||||
hostnames=["api.example.com"],
|
||||
mtls_certificate_id="xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
|
||||
)
|
||||
assert_matches_type(Optional[HostnameAssociationUpdateResponse], hostname_association, path=["response"])
|
||||
|
|
|
|||
|
|
@ -22,7 +22,7 @@ class TestRules:
|
|||
def test_method_update(self, client: Cloudflare) -> None:
|
||||
rule = client.cloud_connector.rules.update(
|
||||
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
|
||||
body=[{}, {}, {}],
|
||||
body=[{}],
|
||||
)
|
||||
assert_matches_type(Optional[RuleUpdateResponse], rule, path=["response"])
|
||||
|
||||
|
|
@ -30,7 +30,7 @@ class TestRules:
|
|||
def test_raw_response_update(self, client: Cloudflare) -> None:
|
||||
response = client.cloud_connector.rules.with_raw_response.update(
|
||||
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
|
||||
body=[{}, {}, {}],
|
||||
body=[{}],
|
||||
)
|
||||
|
||||
assert response.is_closed is True
|
||||
|
|
@ -42,7 +42,7 @@ class TestRules:
|
|||
def test_streaming_response_update(self, client: Cloudflare) -> None:
|
||||
with client.cloud_connector.rules.with_streaming_response.update(
|
||||
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
|
||||
body=[{}, {}, {}],
|
||||
body=[{}],
|
||||
) as response:
|
||||
assert not response.is_closed
|
||||
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
|
||||
|
|
@ -57,7 +57,7 @@ class TestRules:
|
|||
with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"):
|
||||
client.cloud_connector.rules.with_raw_response.update(
|
||||
zone_id="",
|
||||
body=[{}, {}, {}],
|
||||
body=[{}],
|
||||
)
|
||||
|
||||
@parametrize
|
||||
|
|
@ -106,7 +106,7 @@ class TestAsyncRules:
|
|||
async def test_method_update(self, async_client: AsyncCloudflare) -> None:
|
||||
rule = await async_client.cloud_connector.rules.update(
|
||||
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
|
||||
body=[{}, {}, {}],
|
||||
body=[{}],
|
||||
)
|
||||
assert_matches_type(Optional[RuleUpdateResponse], rule, path=["response"])
|
||||
|
||||
|
|
@ -114,7 +114,7 @@ class TestAsyncRules:
|
|||
async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None:
|
||||
response = await async_client.cloud_connector.rules.with_raw_response.update(
|
||||
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
|
||||
body=[{}, {}, {}],
|
||||
body=[{}],
|
||||
)
|
||||
|
||||
assert response.is_closed is True
|
||||
|
|
@ -126,7 +126,7 @@ class TestAsyncRules:
|
|||
async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> None:
|
||||
async with async_client.cloud_connector.rules.with_streaming_response.update(
|
||||
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
|
||||
body=[{}, {}, {}],
|
||||
body=[{}],
|
||||
) as response:
|
||||
assert not response.is_closed
|
||||
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
|
||||
|
|
@ -141,7 +141,7 @@ class TestAsyncRules:
|
|||
with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"):
|
||||
await async_client.cloud_connector.rules.with_raw_response.update(
|
||||
zone_id="",
|
||||
body=[{}, {}, {}],
|
||||
body=[{}],
|
||||
)
|
||||
|
||||
@parametrize
|
||||
|
|
|
|||
|
|
@ -191,7 +191,7 @@ class TestDatabase:
|
|||
dump_options={
|
||||
"no_data": True,
|
||||
"no_schema": True,
|
||||
"tables": ["string", "string", "string"],
|
||||
"tables": ["string"],
|
||||
},
|
||||
)
|
||||
assert_matches_type(DatabaseExportResponse, database, path=["response"])
|
||||
|
|
@ -763,7 +763,7 @@ class TestAsyncDatabase:
|
|||
dump_options={
|
||||
"no_data": True,
|
||||
"no_schema": True,
|
||||
"tables": ["string", "string", "string"],
|
||||
"tables": ["string"],
|
||||
},
|
||||
)
|
||||
assert_matches_type(DatabaseExportResponse, database, path=["response"])
|
||||
|
|
|
|||
|
|
@ -29,11 +29,7 @@ class TestViews:
|
|||
view = client.dns.settings.views.create(
|
||||
account_id="023e105f4ecef8ad9ca31a8372d0c353",
|
||||
name="my view",
|
||||
zones=[
|
||||
"372e67954025e0ba6aaa6d586b9e0b59",
|
||||
"372e67954025e0ba6aaa6d586b9e0b59",
|
||||
"372e67954025e0ba6aaa6d586b9e0b59",
|
||||
],
|
||||
zones=["372e67954025e0ba6aaa6d586b9e0b59"],
|
||||
)
|
||||
assert_matches_type(Optional[ViewCreateResponse], view, path=["response"])
|
||||
|
||||
|
|
@ -42,11 +38,7 @@ class TestViews:
|
|||
response = client.dns.settings.views.with_raw_response.create(
|
||||
account_id="023e105f4ecef8ad9ca31a8372d0c353",
|
||||
name="my view",
|
||||
zones=[
|
||||
"372e67954025e0ba6aaa6d586b9e0b59",
|
||||
"372e67954025e0ba6aaa6d586b9e0b59",
|
||||
"372e67954025e0ba6aaa6d586b9e0b59",
|
||||
],
|
||||
zones=["372e67954025e0ba6aaa6d586b9e0b59"],
|
||||
)
|
||||
|
||||
assert response.is_closed is True
|
||||
|
|
@ -59,11 +51,7 @@ class TestViews:
|
|||
with client.dns.settings.views.with_streaming_response.create(
|
||||
account_id="023e105f4ecef8ad9ca31a8372d0c353",
|
||||
name="my view",
|
||||
zones=[
|
||||
"372e67954025e0ba6aaa6d586b9e0b59",
|
||||
"372e67954025e0ba6aaa6d586b9e0b59",
|
||||
"372e67954025e0ba6aaa6d586b9e0b59",
|
||||
],
|
||||
zones=["372e67954025e0ba6aaa6d586b9e0b59"],
|
||||
) as response:
|
||||
assert not response.is_closed
|
||||
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
|
||||
|
|
@ -79,11 +67,7 @@ class TestViews:
|
|||
client.dns.settings.views.with_raw_response.create(
|
||||
account_id="",
|
||||
name="my view",
|
||||
zones=[
|
||||
"372e67954025e0ba6aaa6d586b9e0b59",
|
||||
"372e67954025e0ba6aaa6d586b9e0b59",
|
||||
"372e67954025e0ba6aaa6d586b9e0b59",
|
||||
],
|
||||
zones=["372e67954025e0ba6aaa6d586b9e0b59"],
|
||||
)
|
||||
|
||||
@parametrize
|
||||
|
|
@ -206,11 +190,7 @@ class TestViews:
|
|||
view_id="023e105f4ecef8ad9ca31a8372d0c353",
|
||||
account_id="023e105f4ecef8ad9ca31a8372d0c353",
|
||||
name="my view",
|
||||
zones=[
|
||||
"372e67954025e0ba6aaa6d586b9e0b59",
|
||||
"372e67954025e0ba6aaa6d586b9e0b59",
|
||||
"372e67954025e0ba6aaa6d586b9e0b59",
|
||||
],
|
||||
zones=["372e67954025e0ba6aaa6d586b9e0b59"],
|
||||
)
|
||||
assert_matches_type(Optional[ViewEditResponse], view, path=["response"])
|
||||
|
||||
|
|
@ -311,11 +291,7 @@ class TestAsyncViews:
|
|||
view = await async_client.dns.settings.views.create(
|
||||
account_id="023e105f4ecef8ad9ca31a8372d0c353",
|
||||
name="my view",
|
||||
zones=[
|
||||
"372e67954025e0ba6aaa6d586b9e0b59",
|
||||
"372e67954025e0ba6aaa6d586b9e0b59",
|
||||
"372e67954025e0ba6aaa6d586b9e0b59",
|
||||
],
|
||||
zones=["372e67954025e0ba6aaa6d586b9e0b59"],
|
||||
)
|
||||
assert_matches_type(Optional[ViewCreateResponse], view, path=["response"])
|
||||
|
||||
|
|
@ -324,11 +300,7 @@ class TestAsyncViews:
|
|||
response = await async_client.dns.settings.views.with_raw_response.create(
|
||||
account_id="023e105f4ecef8ad9ca31a8372d0c353",
|
||||
name="my view",
|
||||
zones=[
|
||||
"372e67954025e0ba6aaa6d586b9e0b59",
|
||||
"372e67954025e0ba6aaa6d586b9e0b59",
|
||||
"372e67954025e0ba6aaa6d586b9e0b59",
|
||||
],
|
||||
zones=["372e67954025e0ba6aaa6d586b9e0b59"],
|
||||
)
|
||||
|
||||
assert response.is_closed is True
|
||||
|
|
@ -341,11 +313,7 @@ class TestAsyncViews:
|
|||
async with async_client.dns.settings.views.with_streaming_response.create(
|
||||
account_id="023e105f4ecef8ad9ca31a8372d0c353",
|
||||
name="my view",
|
||||
zones=[
|
||||
"372e67954025e0ba6aaa6d586b9e0b59",
|
||||
"372e67954025e0ba6aaa6d586b9e0b59",
|
||||
"372e67954025e0ba6aaa6d586b9e0b59",
|
||||
],
|
||||
zones=["372e67954025e0ba6aaa6d586b9e0b59"],
|
||||
) as response:
|
||||
assert not response.is_closed
|
||||
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
|
||||
|
|
@ -361,11 +329,7 @@ class TestAsyncViews:
|
|||
await async_client.dns.settings.views.with_raw_response.create(
|
||||
account_id="",
|
||||
name="my view",
|
||||
zones=[
|
||||
"372e67954025e0ba6aaa6d586b9e0b59",
|
||||
"372e67954025e0ba6aaa6d586b9e0b59",
|
||||
"372e67954025e0ba6aaa6d586b9e0b59",
|
||||
],
|
||||
zones=["372e67954025e0ba6aaa6d586b9e0b59"],
|
||||
)
|
||||
|
||||
@parametrize
|
||||
|
|
@ -488,11 +452,7 @@ class TestAsyncViews:
|
|||
view_id="023e105f4ecef8ad9ca31a8372d0c353",
|
||||
account_id="023e105f4ecef8ad9ca31a8372d0c353",
|
||||
name="my view",
|
||||
zones=[
|
||||
"372e67954025e0ba6aaa6d586b9e0b59",
|
||||
"372e67954025e0ba6aaa6d586b9e0b59",
|
||||
"372e67954025e0ba6aaa6d586b9e0b59",
|
||||
],
|
||||
zones=["372e67954025e0ba6aaa6d586b9e0b59"],
|
||||
)
|
||||
assert_matches_type(Optional[ViewEditResponse], view, path=["response"])
|
||||
|
||||
|
|
|
|||
|
|
@ -2728,52 +2728,24 @@ class TestRecords:
|
|||
def test_method_batch_with_all_params(self, client: Cloudflare) -> None:
|
||||
record = client.dns.records.batch(
|
||||
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
|
||||
deletes=[
|
||||
{"id": "023e105f4ecef8ad9ca31a8372d0c353"},
|
||||
{"id": "023e105f4ecef8ad9ca31a8372d0c353"},
|
||||
{"id": "023e105f4ecef8ad9ca31a8372d0c353"},
|
||||
],
|
||||
deletes=[{"id": "023e105f4ecef8ad9ca31a8372d0c353"}],
|
||||
patches=[
|
||||
{
|
||||
"content": "198.51.100.4",
|
||||
"type": "A",
|
||||
},
|
||||
{
|
||||
"content": "198.51.100.4",
|
||||
"type": "A",
|
||||
},
|
||||
{
|
||||
"content": "198.51.100.4",
|
||||
"type": "A",
|
||||
},
|
||||
}
|
||||
],
|
||||
posts=[
|
||||
{
|
||||
"content": "198.51.100.4",
|
||||
"type": "A",
|
||||
},
|
||||
{
|
||||
"content": "198.51.100.4",
|
||||
"type": "A",
|
||||
},
|
||||
{
|
||||
"content": "198.51.100.4",
|
||||
"type": "A",
|
||||
},
|
||||
}
|
||||
],
|
||||
puts=[
|
||||
{
|
||||
"content": "198.51.100.4",
|
||||
"type": "A",
|
||||
},
|
||||
{
|
||||
"content": "198.51.100.4",
|
||||
"type": "A",
|
||||
},
|
||||
{
|
||||
"content": "198.51.100.4",
|
||||
"type": "A",
|
||||
},
|
||||
}
|
||||
],
|
||||
)
|
||||
assert_matches_type(Optional[RecordBatchResponse], record, path=["response"])
|
||||
|
|
@ -7092,52 +7064,24 @@ class TestAsyncRecords:
|
|||
async def test_method_batch_with_all_params(self, async_client: AsyncCloudflare) -> None:
|
||||
record = await async_client.dns.records.batch(
|
||||
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
|
||||
deletes=[
|
||||
{"id": "023e105f4ecef8ad9ca31a8372d0c353"},
|
||||
{"id": "023e105f4ecef8ad9ca31a8372d0c353"},
|
||||
{"id": "023e105f4ecef8ad9ca31a8372d0c353"},
|
||||
],
|
||||
deletes=[{"id": "023e105f4ecef8ad9ca31a8372d0c353"}],
|
||||
patches=[
|
||||
{
|
||||
"content": "198.51.100.4",
|
||||
"type": "A",
|
||||
},
|
||||
{
|
||||
"content": "198.51.100.4",
|
||||
"type": "A",
|
||||
},
|
||||
{
|
||||
"content": "198.51.100.4",
|
||||
"type": "A",
|
||||
},
|
||||
}
|
||||
],
|
||||
posts=[
|
||||
{
|
||||
"content": "198.51.100.4",
|
||||
"type": "A",
|
||||
},
|
||||
{
|
||||
"content": "198.51.100.4",
|
||||
"type": "A",
|
||||
},
|
||||
{
|
||||
"content": "198.51.100.4",
|
||||
"type": "A",
|
||||
},
|
||||
}
|
||||
],
|
||||
puts=[
|
||||
{
|
||||
"content": "198.51.100.4",
|
||||
"type": "A",
|
||||
},
|
||||
{
|
||||
"content": "198.51.100.4",
|
||||
"type": "A",
|
||||
},
|
||||
{
|
||||
"content": "198.51.100.4",
|
||||
"type": "A",
|
||||
},
|
||||
}
|
||||
],
|
||||
)
|
||||
assert_matches_type(Optional[RecordBatchResponse], record, path=["response"])
|
||||
|
|
|
|||
|
|
@ -21,8 +21,8 @@ class TestCatchAlls:
|
|||
def test_method_update(self, client: Cloudflare) -> None:
|
||||
catch_all = client.email_routing.rules.catch_alls.update(
|
||||
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
|
||||
actions=[{"type": "drop"}, {"type": "drop"}, {"type": "drop"}],
|
||||
matchers=[{"type": "all"}, {"type": "all"}, {"type": "all"}],
|
||||
actions=[{"type": "drop"}],
|
||||
matchers=[{"type": "all"}],
|
||||
)
|
||||
assert_matches_type(Optional[CatchAllUpdateResponse], catch_all, path=["response"])
|
||||
|
||||
|
|
@ -33,30 +33,10 @@ class TestCatchAlls:
|
|||
actions=[
|
||||
{
|
||||
"type": "drop",
|
||||
"value": [
|
||||
"destinationaddress@example.net",
|
||||
"destinationaddress@example.net",
|
||||
"destinationaddress@example.net",
|
||||
],
|
||||
},
|
||||
{
|
||||
"type": "drop",
|
||||
"value": [
|
||||
"destinationaddress@example.net",
|
||||
"destinationaddress@example.net",
|
||||
"destinationaddress@example.net",
|
||||
],
|
||||
},
|
||||
{
|
||||
"type": "drop",
|
||||
"value": [
|
||||
"destinationaddress@example.net",
|
||||
"destinationaddress@example.net",
|
||||
"destinationaddress@example.net",
|
||||
],
|
||||
},
|
||||
"value": ["destinationaddress@example.net"],
|
||||
}
|
||||
],
|
||||
matchers=[{"type": "all"}, {"type": "all"}, {"type": "all"}],
|
||||
matchers=[{"type": "all"}],
|
||||
enabled=True,
|
||||
name="Send to user@example.net rule.",
|
||||
)
|
||||
|
|
@ -66,8 +46,8 @@ class TestCatchAlls:
|
|||
def test_raw_response_update(self, client: Cloudflare) -> None:
|
||||
response = client.email_routing.rules.catch_alls.with_raw_response.update(
|
||||
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
|
||||
actions=[{"type": "drop"}, {"type": "drop"}, {"type": "drop"}],
|
||||
matchers=[{"type": "all"}, {"type": "all"}, {"type": "all"}],
|
||||
actions=[{"type": "drop"}],
|
||||
matchers=[{"type": "all"}],
|
||||
)
|
||||
|
||||
assert response.is_closed is True
|
||||
|
|
@ -79,8 +59,8 @@ class TestCatchAlls:
|
|||
def test_streaming_response_update(self, client: Cloudflare) -> None:
|
||||
with client.email_routing.rules.catch_alls.with_streaming_response.update(
|
||||
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
|
||||
actions=[{"type": "drop"}, {"type": "drop"}, {"type": "drop"}],
|
||||
matchers=[{"type": "all"}, {"type": "all"}, {"type": "all"}],
|
||||
actions=[{"type": "drop"}],
|
||||
matchers=[{"type": "all"}],
|
||||
) as response:
|
||||
assert not response.is_closed
|
||||
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
|
||||
|
|
@ -95,8 +75,8 @@ class TestCatchAlls:
|
|||
with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"):
|
||||
client.email_routing.rules.catch_alls.with_raw_response.update(
|
||||
zone_id="",
|
||||
actions=[{"type": "drop"}, {"type": "drop"}, {"type": "drop"}],
|
||||
matchers=[{"type": "all"}, {"type": "all"}, {"type": "all"}],
|
||||
actions=[{"type": "drop"}],
|
||||
matchers=[{"type": "all"}],
|
||||
)
|
||||
|
||||
@parametrize
|
||||
|
|
@ -145,8 +125,8 @@ class TestAsyncCatchAlls:
|
|||
async def test_method_update(self, async_client: AsyncCloudflare) -> None:
|
||||
catch_all = await async_client.email_routing.rules.catch_alls.update(
|
||||
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
|
||||
actions=[{"type": "drop"}, {"type": "drop"}, {"type": "drop"}],
|
||||
matchers=[{"type": "all"}, {"type": "all"}, {"type": "all"}],
|
||||
actions=[{"type": "drop"}],
|
||||
matchers=[{"type": "all"}],
|
||||
)
|
||||
assert_matches_type(Optional[CatchAllUpdateResponse], catch_all, path=["response"])
|
||||
|
||||
|
|
@ -157,30 +137,10 @@ class TestAsyncCatchAlls:
|
|||
actions=[
|
||||
{
|
||||
"type": "drop",
|
||||
"value": [
|
||||
"destinationaddress@example.net",
|
||||
"destinationaddress@example.net",
|
||||
"destinationaddress@example.net",
|
||||
],
|
||||
},
|
||||
{
|
||||
"type": "drop",
|
||||
"value": [
|
||||
"destinationaddress@example.net",
|
||||
"destinationaddress@example.net",
|
||||
"destinationaddress@example.net",
|
||||
],
|
||||
},
|
||||
{
|
||||
"type": "drop",
|
||||
"value": [
|
||||
"destinationaddress@example.net",
|
||||
"destinationaddress@example.net",
|
||||
"destinationaddress@example.net",
|
||||
],
|
||||
},
|
||||
"value": ["destinationaddress@example.net"],
|
||||
}
|
||||
],
|
||||
matchers=[{"type": "all"}, {"type": "all"}, {"type": "all"}],
|
||||
matchers=[{"type": "all"}],
|
||||
enabled=True,
|
||||
name="Send to user@example.net rule.",
|
||||
)
|
||||
|
|
@ -190,8 +150,8 @@ class TestAsyncCatchAlls:
|
|||
async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None:
|
||||
response = await async_client.email_routing.rules.catch_alls.with_raw_response.update(
|
||||
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
|
||||
actions=[{"type": "drop"}, {"type": "drop"}, {"type": "drop"}],
|
||||
matchers=[{"type": "all"}, {"type": "all"}, {"type": "all"}],
|
||||
actions=[{"type": "drop"}],
|
||||
matchers=[{"type": "all"}],
|
||||
)
|
||||
|
||||
assert response.is_closed is True
|
||||
|
|
@ -203,8 +163,8 @@ class TestAsyncCatchAlls:
|
|||
async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> None:
|
||||
async with async_client.email_routing.rules.catch_alls.with_streaming_response.update(
|
||||
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
|
||||
actions=[{"type": "drop"}, {"type": "drop"}, {"type": "drop"}],
|
||||
matchers=[{"type": "all"}, {"type": "all"}, {"type": "all"}],
|
||||
actions=[{"type": "drop"}],
|
||||
matchers=[{"type": "all"}],
|
||||
) as response:
|
||||
assert not response.is_closed
|
||||
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
|
||||
|
|
@ -219,8 +179,8 @@ class TestAsyncCatchAlls:
|
|||
with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"):
|
||||
await async_client.email_routing.rules.catch_alls.with_raw_response.update(
|
||||
zone_id="",
|
||||
actions=[{"type": "drop"}, {"type": "drop"}, {"type": "drop"}],
|
||||
matchers=[{"type": "all"}, {"type": "all"}, {"type": "all"}],
|
||||
actions=[{"type": "drop"}],
|
||||
matchers=[{"type": "all"}],
|
||||
)
|
||||
|
||||
@parametrize
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load diff
|
|
@ -118,25 +118,7 @@ class TestAllowPatterns:
|
|||
"pattern": "test@example.com",
|
||||
"pattern_type": "EMAIL",
|
||||
"verify_sender": True,
|
||||
},
|
||||
{
|
||||
"is_recipient": False,
|
||||
"is_regex": False,
|
||||
"is_sender": True,
|
||||
"is_spoof": False,
|
||||
"pattern": "test@example.com",
|
||||
"pattern_type": "EMAIL",
|
||||
"verify_sender": True,
|
||||
},
|
||||
{
|
||||
"is_recipient": False,
|
||||
"is_regex": False,
|
||||
"is_sender": True,
|
||||
"is_spoof": False,
|
||||
"pattern": "test@example.com",
|
||||
"pattern_type": "EMAIL",
|
||||
"verify_sender": True,
|
||||
},
|
||||
}
|
||||
],
|
||||
)
|
||||
assert_matches_type(AllowPatternCreateResponse, allow_pattern, path=["response"])
|
||||
|
|
@ -154,25 +136,7 @@ class TestAllowPatterns:
|
|||
"pattern": "test@example.com",
|
||||
"pattern_type": "EMAIL",
|
||||
"verify_sender": True,
|
||||
},
|
||||
{
|
||||
"is_recipient": False,
|
||||
"is_regex": False,
|
||||
"is_sender": True,
|
||||
"is_spoof": False,
|
||||
"pattern": "test@example.com",
|
||||
"pattern_type": "EMAIL",
|
||||
"verify_sender": True,
|
||||
},
|
||||
{
|
||||
"is_recipient": False,
|
||||
"is_regex": False,
|
||||
"is_sender": True,
|
||||
"is_spoof": False,
|
||||
"pattern": "test@example.com",
|
||||
"pattern_type": "EMAIL",
|
||||
"verify_sender": True,
|
||||
},
|
||||
}
|
||||
],
|
||||
)
|
||||
|
||||
|
|
@ -194,25 +158,7 @@ class TestAllowPatterns:
|
|||
"pattern": "test@example.com",
|
||||
"pattern_type": "EMAIL",
|
||||
"verify_sender": True,
|
||||
},
|
||||
{
|
||||
"is_recipient": False,
|
||||
"is_regex": False,
|
||||
"is_sender": True,
|
||||
"is_spoof": False,
|
||||
"pattern": "test@example.com",
|
||||
"pattern_type": "EMAIL",
|
||||
"verify_sender": True,
|
||||
},
|
||||
{
|
||||
"is_recipient": False,
|
||||
"is_regex": False,
|
||||
"is_sender": True,
|
||||
"is_spoof": False,
|
||||
"pattern": "test@example.com",
|
||||
"pattern_type": "EMAIL",
|
||||
"verify_sender": True,
|
||||
},
|
||||
}
|
||||
],
|
||||
) as response:
|
||||
assert not response.is_closed
|
||||
|
|
@ -237,25 +183,7 @@ class TestAllowPatterns:
|
|||
"pattern": "test@example.com",
|
||||
"pattern_type": "EMAIL",
|
||||
"verify_sender": True,
|
||||
},
|
||||
{
|
||||
"is_recipient": False,
|
||||
"is_regex": False,
|
||||
"is_sender": True,
|
||||
"is_spoof": False,
|
||||
"pattern": "test@example.com",
|
||||
"pattern_type": "EMAIL",
|
||||
"verify_sender": True,
|
||||
},
|
||||
{
|
||||
"is_recipient": False,
|
||||
"is_regex": False,
|
||||
"is_sender": True,
|
||||
"is_spoof": False,
|
||||
"pattern": "test@example.com",
|
||||
"pattern_type": "EMAIL",
|
||||
"verify_sender": True,
|
||||
},
|
||||
}
|
||||
],
|
||||
)
|
||||
|
||||
|
|
@ -554,25 +482,7 @@ class TestAsyncAllowPatterns:
|
|||
"pattern": "test@example.com",
|
||||
"pattern_type": "EMAIL",
|
||||
"verify_sender": True,
|
||||
},
|
||||
{
|
||||
"is_recipient": False,
|
||||
"is_regex": False,
|
||||
"is_sender": True,
|
||||
"is_spoof": False,
|
||||
"pattern": "test@example.com",
|
||||
"pattern_type": "EMAIL",
|
||||
"verify_sender": True,
|
||||
},
|
||||
{
|
||||
"is_recipient": False,
|
||||
"is_regex": False,
|
||||
"is_sender": True,
|
||||
"is_spoof": False,
|
||||
"pattern": "test@example.com",
|
||||
"pattern_type": "EMAIL",
|
||||
"verify_sender": True,
|
||||
},
|
||||
}
|
||||
],
|
||||
)
|
||||
assert_matches_type(AllowPatternCreateResponse, allow_pattern, path=["response"])
|
||||
|
|
@ -590,25 +500,7 @@ class TestAsyncAllowPatterns:
|
|||
"pattern": "test@example.com",
|
||||
"pattern_type": "EMAIL",
|
||||
"verify_sender": True,
|
||||
},
|
||||
{
|
||||
"is_recipient": False,
|
||||
"is_regex": False,
|
||||
"is_sender": True,
|
||||
"is_spoof": False,
|
||||
"pattern": "test@example.com",
|
||||
"pattern_type": "EMAIL",
|
||||
"verify_sender": True,
|
||||
},
|
||||
{
|
||||
"is_recipient": False,
|
||||
"is_regex": False,
|
||||
"is_sender": True,
|
||||
"is_spoof": False,
|
||||
"pattern": "test@example.com",
|
||||
"pattern_type": "EMAIL",
|
||||
"verify_sender": True,
|
||||
},
|
||||
}
|
||||
],
|
||||
)
|
||||
|
||||
|
|
@ -630,25 +522,7 @@ class TestAsyncAllowPatterns:
|
|||
"pattern": "test@example.com",
|
||||
"pattern_type": "EMAIL",
|
||||
"verify_sender": True,
|
||||
},
|
||||
{
|
||||
"is_recipient": False,
|
||||
"is_regex": False,
|
||||
"is_sender": True,
|
||||
"is_spoof": False,
|
||||
"pattern": "test@example.com",
|
||||
"pattern_type": "EMAIL",
|
||||
"verify_sender": True,
|
||||
},
|
||||
{
|
||||
"is_recipient": False,
|
||||
"is_regex": False,
|
||||
"is_sender": True,
|
||||
"is_spoof": False,
|
||||
"pattern": "test@example.com",
|
||||
"pattern_type": "EMAIL",
|
||||
"verify_sender": True,
|
||||
},
|
||||
}
|
||||
],
|
||||
) as response:
|
||||
assert not response.is_closed
|
||||
|
|
@ -673,25 +547,7 @@ class TestAsyncAllowPatterns:
|
|||
"pattern": "test@example.com",
|
||||
"pattern_type": "EMAIL",
|
||||
"verify_sender": True,
|
||||
},
|
||||
{
|
||||
"is_recipient": False,
|
||||
"is_regex": False,
|
||||
"is_sender": True,
|
||||
"is_spoof": False,
|
||||
"pattern": "test@example.com",
|
||||
"pattern_type": "EMAIL",
|
||||
"verify_sender": True,
|
||||
},
|
||||
{
|
||||
"is_recipient": False,
|
||||
"is_regex": False,
|
||||
"is_sender": True,
|
||||
"is_spoof": False,
|
||||
"pattern": "test@example.com",
|
||||
"pattern_type": "EMAIL",
|
||||
"verify_sender": True,
|
||||
},
|
||||
}
|
||||
],
|
||||
)
|
||||
|
||||
|
|
|
|||
|
|
@ -94,17 +94,7 @@ class TestBlockSenders:
|
|||
"is_regex": False,
|
||||
"pattern": "test@example.com",
|
||||
"pattern_type": "EMAIL",
|
||||
},
|
||||
{
|
||||
"is_regex": False,
|
||||
"pattern": "test@example.com",
|
||||
"pattern_type": "EMAIL",
|
||||
},
|
||||
{
|
||||
"is_regex": False,
|
||||
"pattern": "test@example.com",
|
||||
"pattern_type": "EMAIL",
|
||||
},
|
||||
}
|
||||
],
|
||||
)
|
||||
assert_matches_type(BlockSenderCreateResponse, block_sender, path=["response"])
|
||||
|
|
@ -118,17 +108,7 @@ class TestBlockSenders:
|
|||
"is_regex": False,
|
||||
"pattern": "test@example.com",
|
||||
"pattern_type": "EMAIL",
|
||||
},
|
||||
{
|
||||
"is_regex": False,
|
||||
"pattern": "test@example.com",
|
||||
"pattern_type": "EMAIL",
|
||||
},
|
||||
{
|
||||
"is_regex": False,
|
||||
"pattern": "test@example.com",
|
||||
"pattern_type": "EMAIL",
|
||||
},
|
||||
}
|
||||
],
|
||||
)
|
||||
|
||||
|
|
@ -146,17 +126,7 @@ class TestBlockSenders:
|
|||
"is_regex": False,
|
||||
"pattern": "test@example.com",
|
||||
"pattern_type": "EMAIL",
|
||||
},
|
||||
{
|
||||
"is_regex": False,
|
||||
"pattern": "test@example.com",
|
||||
"pattern_type": "EMAIL",
|
||||
},
|
||||
{
|
||||
"is_regex": False,
|
||||
"pattern": "test@example.com",
|
||||
"pattern_type": "EMAIL",
|
||||
},
|
||||
}
|
||||
],
|
||||
) as response:
|
||||
assert not response.is_closed
|
||||
|
|
@ -177,17 +147,7 @@ class TestBlockSenders:
|
|||
"is_regex": False,
|
||||
"pattern": "test@example.com",
|
||||
"pattern_type": "EMAIL",
|
||||
},
|
||||
{
|
||||
"is_regex": False,
|
||||
"pattern": "test@example.com",
|
||||
"pattern_type": "EMAIL",
|
||||
},
|
||||
{
|
||||
"is_regex": False,
|
||||
"pattern": "test@example.com",
|
||||
"pattern_type": "EMAIL",
|
||||
},
|
||||
}
|
||||
],
|
||||
)
|
||||
|
||||
|
|
@ -454,17 +414,7 @@ class TestAsyncBlockSenders:
|
|||
"is_regex": False,
|
||||
"pattern": "test@example.com",
|
||||
"pattern_type": "EMAIL",
|
||||
},
|
||||
{
|
||||
"is_regex": False,
|
||||
"pattern": "test@example.com",
|
||||
"pattern_type": "EMAIL",
|
||||
},
|
||||
{
|
||||
"is_regex": False,
|
||||
"pattern": "test@example.com",
|
||||
"pattern_type": "EMAIL",
|
||||
},
|
||||
}
|
||||
],
|
||||
)
|
||||
assert_matches_type(BlockSenderCreateResponse, block_sender, path=["response"])
|
||||
|
|
@ -478,17 +428,7 @@ class TestAsyncBlockSenders:
|
|||
"is_regex": False,
|
||||
"pattern": "test@example.com",
|
||||
"pattern_type": "EMAIL",
|
||||
},
|
||||
{
|
||||
"is_regex": False,
|
||||
"pattern": "test@example.com",
|
||||
"pattern_type": "EMAIL",
|
||||
},
|
||||
{
|
||||
"is_regex": False,
|
||||
"pattern": "test@example.com",
|
||||
"pattern_type": "EMAIL",
|
||||
},
|
||||
}
|
||||
],
|
||||
)
|
||||
|
||||
|
|
@ -506,17 +446,7 @@ class TestAsyncBlockSenders:
|
|||
"is_regex": False,
|
||||
"pattern": "test@example.com",
|
||||
"pattern_type": "EMAIL",
|
||||
},
|
||||
{
|
||||
"is_regex": False,
|
||||
"pattern": "test@example.com",
|
||||
"pattern_type": "EMAIL",
|
||||
},
|
||||
{
|
||||
"is_regex": False,
|
||||
"pattern": "test@example.com",
|
||||
"pattern_type": "EMAIL",
|
||||
},
|
||||
}
|
||||
],
|
||||
) as response:
|
||||
assert not response.is_closed
|
||||
|
|
@ -537,17 +467,7 @@ class TestAsyncBlockSenders:
|
|||
"is_regex": False,
|
||||
"pattern": "test@example.com",
|
||||
"pattern_type": "EMAIL",
|
||||
},
|
||||
{
|
||||
"is_regex": False,
|
||||
"pattern": "test@example.com",
|
||||
"pattern_type": "EMAIL",
|
||||
},
|
||||
{
|
||||
"is_regex": False,
|
||||
"pattern": "test@example.com",
|
||||
"pattern_type": "EMAIL",
|
||||
},
|
||||
}
|
||||
],
|
||||
)
|
||||
|
||||
|
|
|
|||
|
|
@ -35,7 +35,7 @@ class TestDomains:
|
|||
account_id="023e105f4ecef8ad9ca31a8372d0c353",
|
||||
allowed_delivery_mode="DIRECT",
|
||||
direction="asc",
|
||||
domain=["string", "string", "string"],
|
||||
domain=["string"],
|
||||
order="domain",
|
||||
page=1,
|
||||
per_page=1,
|
||||
|
|
@ -186,7 +186,7 @@ class TestAsyncDomains:
|
|||
account_id="023e105f4ecef8ad9ca31a8372d0c353",
|
||||
allowed_delivery_mode="DIRECT",
|
||||
direction="asc",
|
||||
domain=["string", "string", "string"],
|
||||
domain=["string"],
|
||||
order="domain",
|
||||
page=1,
|
||||
per_page=1,
|
||||
|
|
|
|||
|
|
@ -83,17 +83,7 @@ class TestImpersonationRegistry:
|
|||
"email": "email",
|
||||
"is_email_regex": True,
|
||||
"name": "name",
|
||||
},
|
||||
{
|
||||
"email": "email",
|
||||
"is_email_regex": True,
|
||||
"name": "name",
|
||||
},
|
||||
{
|
||||
"email": "email",
|
||||
"is_email_regex": True,
|
||||
"name": "name",
|
||||
},
|
||||
}
|
||||
],
|
||||
)
|
||||
assert_matches_type(ImpersonationRegistryCreateResponse, impersonation_registry, path=["response"])
|
||||
|
|
@ -107,17 +97,7 @@ class TestImpersonationRegistry:
|
|||
"email": "email",
|
||||
"is_email_regex": True,
|
||||
"name": "name",
|
||||
},
|
||||
{
|
||||
"email": "email",
|
||||
"is_email_regex": True,
|
||||
"name": "name",
|
||||
},
|
||||
{
|
||||
"email": "email",
|
||||
"is_email_regex": True,
|
||||
"name": "name",
|
||||
},
|
||||
}
|
||||
],
|
||||
)
|
||||
|
||||
|
|
@ -135,17 +115,7 @@ class TestImpersonationRegistry:
|
|||
"email": "email",
|
||||
"is_email_regex": True,
|
||||
"name": "name",
|
||||
},
|
||||
{
|
||||
"email": "email",
|
||||
"is_email_regex": True,
|
||||
"name": "name",
|
||||
},
|
||||
{
|
||||
"email": "email",
|
||||
"is_email_regex": True,
|
||||
"name": "name",
|
||||
},
|
||||
}
|
||||
],
|
||||
) as response:
|
||||
assert not response.is_closed
|
||||
|
|
@ -166,17 +136,7 @@ class TestImpersonationRegistry:
|
|||
"email": "email",
|
||||
"is_email_regex": True,
|
||||
"name": "name",
|
||||
},
|
||||
{
|
||||
"email": "email",
|
||||
"is_email_regex": True,
|
||||
"name": "name",
|
||||
},
|
||||
{
|
||||
"email": "email",
|
||||
"is_email_regex": True,
|
||||
"name": "name",
|
||||
},
|
||||
}
|
||||
],
|
||||
)
|
||||
|
||||
|
|
@ -439,17 +399,7 @@ class TestAsyncImpersonationRegistry:
|
|||
"email": "email",
|
||||
"is_email_regex": True,
|
||||
"name": "name",
|
||||
},
|
||||
{
|
||||
"email": "email",
|
||||
"is_email_regex": True,
|
||||
"name": "name",
|
||||
},
|
||||
{
|
||||
"email": "email",
|
||||
"is_email_regex": True,
|
||||
"name": "name",
|
||||
},
|
||||
}
|
||||
],
|
||||
)
|
||||
assert_matches_type(ImpersonationRegistryCreateResponse, impersonation_registry, path=["response"])
|
||||
|
|
@ -463,17 +413,7 @@ class TestAsyncImpersonationRegistry:
|
|||
"email": "email",
|
||||
"is_email_regex": True,
|
||||
"name": "name",
|
||||
},
|
||||
{
|
||||
"email": "email",
|
||||
"is_email_regex": True,
|
||||
"name": "name",
|
||||
},
|
||||
{
|
||||
"email": "email",
|
||||
"is_email_regex": True,
|
||||
"name": "name",
|
||||
},
|
||||
}
|
||||
],
|
||||
)
|
||||
|
||||
|
|
@ -491,17 +431,7 @@ class TestAsyncImpersonationRegistry:
|
|||
"email": "email",
|
||||
"is_email_regex": True,
|
||||
"name": "name",
|
||||
},
|
||||
{
|
||||
"email": "email",
|
||||
"is_email_regex": True,
|
||||
"name": "name",
|
||||
},
|
||||
{
|
||||
"email": "email",
|
||||
"is_email_regex": True,
|
||||
"name": "name",
|
||||
},
|
||||
}
|
||||
],
|
||||
) as response:
|
||||
assert not response.is_closed
|
||||
|
|
@ -522,17 +452,7 @@ class TestAsyncImpersonationRegistry:
|
|||
"email": "email",
|
||||
"is_email_regex": True,
|
||||
"name": "name",
|
||||
},
|
||||
{
|
||||
"email": "email",
|
||||
"is_email_regex": True,
|
||||
"name": "name",
|
||||
},
|
||||
{
|
||||
"email": "email",
|
||||
"is_email_regex": True,
|
||||
"name": "name",
|
||||
},
|
||||
}
|
||||
],
|
||||
)
|
||||
|
||||
|
|
|
|||
|
|
@ -100,19 +100,7 @@ class TestTrustedDomains:
|
|||
"is_regex": False,
|
||||
"is_similarity": False,
|
||||
"pattern": "example.com",
|
||||
},
|
||||
{
|
||||
"is_recent": True,
|
||||
"is_regex": False,
|
||||
"is_similarity": False,
|
||||
"pattern": "example.com",
|
||||
},
|
||||
{
|
||||
"is_recent": True,
|
||||
"is_regex": False,
|
||||
"is_similarity": False,
|
||||
"pattern": "example.com",
|
||||
},
|
||||
}
|
||||
],
|
||||
)
|
||||
assert_matches_type(TrustedDomainCreateResponse, trusted_domain, path=["response"])
|
||||
|
|
@ -127,19 +115,7 @@ class TestTrustedDomains:
|
|||
"is_regex": False,
|
||||
"is_similarity": False,
|
||||
"pattern": "example.com",
|
||||
},
|
||||
{
|
||||
"is_recent": True,
|
||||
"is_regex": False,
|
||||
"is_similarity": False,
|
||||
"pattern": "example.com",
|
||||
},
|
||||
{
|
||||
"is_recent": True,
|
||||
"is_regex": False,
|
||||
"is_similarity": False,
|
||||
"pattern": "example.com",
|
||||
},
|
||||
}
|
||||
],
|
||||
)
|
||||
|
||||
|
|
@ -158,19 +134,7 @@ class TestTrustedDomains:
|
|||
"is_regex": False,
|
||||
"is_similarity": False,
|
||||
"pattern": "example.com",
|
||||
},
|
||||
{
|
||||
"is_recent": True,
|
||||
"is_regex": False,
|
||||
"is_similarity": False,
|
||||
"pattern": "example.com",
|
||||
},
|
||||
{
|
||||
"is_recent": True,
|
||||
"is_regex": False,
|
||||
"is_similarity": False,
|
||||
"pattern": "example.com",
|
||||
},
|
||||
}
|
||||
],
|
||||
) as response:
|
||||
assert not response.is_closed
|
||||
|
|
@ -192,19 +156,7 @@ class TestTrustedDomains:
|
|||
"is_regex": False,
|
||||
"is_similarity": False,
|
||||
"pattern": "example.com",
|
||||
},
|
||||
{
|
||||
"is_recent": True,
|
||||
"is_regex": False,
|
||||
"is_similarity": False,
|
||||
"pattern": "example.com",
|
||||
},
|
||||
{
|
||||
"is_recent": True,
|
||||
"is_regex": False,
|
||||
"is_similarity": False,
|
||||
"pattern": "example.com",
|
||||
},
|
||||
}
|
||||
],
|
||||
)
|
||||
|
||||
|
|
@ -479,19 +431,7 @@ class TestAsyncTrustedDomains:
|
|||
"is_regex": False,
|
||||
"is_similarity": False,
|
||||
"pattern": "example.com",
|
||||
},
|
||||
{
|
||||
"is_recent": True,
|
||||
"is_regex": False,
|
||||
"is_similarity": False,
|
||||
"pattern": "example.com",
|
||||
},
|
||||
{
|
||||
"is_recent": True,
|
||||
"is_regex": False,
|
||||
"is_similarity": False,
|
||||
"pattern": "example.com",
|
||||
},
|
||||
}
|
||||
],
|
||||
)
|
||||
assert_matches_type(TrustedDomainCreateResponse, trusted_domain, path=["response"])
|
||||
|
|
@ -506,19 +446,7 @@ class TestAsyncTrustedDomains:
|
|||
"is_regex": False,
|
||||
"is_similarity": False,
|
||||
"pattern": "example.com",
|
||||
},
|
||||
{
|
||||
"is_recent": True,
|
||||
"is_regex": False,
|
||||
"is_similarity": False,
|
||||
"pattern": "example.com",
|
||||
},
|
||||
{
|
||||
"is_recent": True,
|
||||
"is_regex": False,
|
||||
"is_similarity": False,
|
||||
"pattern": "example.com",
|
||||
},
|
||||
}
|
||||
],
|
||||
)
|
||||
|
||||
|
|
@ -537,19 +465,7 @@ class TestAsyncTrustedDomains:
|
|||
"is_regex": False,
|
||||
"is_similarity": False,
|
||||
"pattern": "example.com",
|
||||
},
|
||||
{
|
||||
"is_recent": True,
|
||||
"is_regex": False,
|
||||
"is_similarity": False,
|
||||
"pattern": "example.com",
|
||||
},
|
||||
{
|
||||
"is_recent": True,
|
||||
"is_regex": False,
|
||||
"is_similarity": False,
|
||||
"pattern": "example.com",
|
||||
},
|
||||
}
|
||||
],
|
||||
) as response:
|
||||
assert not response.is_closed
|
||||
|
|
@ -571,19 +487,7 @@ class TestAsyncTrustedDomains:
|
|||
"is_regex": False,
|
||||
"is_similarity": False,
|
||||
"pattern": "example.com",
|
||||
},
|
||||
{
|
||||
"is_recent": True,
|
||||
"is_regex": False,
|
||||
"is_similarity": False,
|
||||
"pattern": "example.com",
|
||||
},
|
||||
{
|
||||
"is_recent": True,
|
||||
"is_regex": False,
|
||||
"is_similarity": False,
|
||||
"pattern": "example.com",
|
||||
},
|
||||
}
|
||||
],
|
||||
)
|
||||
|
||||
|
|
|
|||
|
|
@ -27,8 +27,8 @@ class TestLockdowns:
|
|||
def test_method_create(self, client: Cloudflare) -> None:
|
||||
lockdown = client.firewall.lockdowns.create(
|
||||
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
|
||||
configurations=[{}, {}, {}],
|
||||
urls=["shop.example.com/*", "shop.example.com/*", "shop.example.com/*"],
|
||||
configurations=[{}],
|
||||
urls=["shop.example.com/*"],
|
||||
)
|
||||
assert_matches_type(Lockdown, lockdown, path=["response"])
|
||||
|
||||
|
|
@ -37,8 +37,8 @@ class TestLockdowns:
|
|||
def test_raw_response_create(self, client: Cloudflare) -> None:
|
||||
response = client.firewall.lockdowns.with_raw_response.create(
|
||||
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
|
||||
configurations=[{}, {}, {}],
|
||||
urls=["shop.example.com/*", "shop.example.com/*", "shop.example.com/*"],
|
||||
configurations=[{}],
|
||||
urls=["shop.example.com/*"],
|
||||
)
|
||||
|
||||
assert response.is_closed is True
|
||||
|
|
@ -51,8 +51,8 @@ class TestLockdowns:
|
|||
def test_streaming_response_create(self, client: Cloudflare) -> None:
|
||||
with client.firewall.lockdowns.with_streaming_response.create(
|
||||
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
|
||||
configurations=[{}, {}, {}],
|
||||
urls=["shop.example.com/*", "shop.example.com/*", "shop.example.com/*"],
|
||||
configurations=[{}],
|
||||
urls=["shop.example.com/*"],
|
||||
) as response:
|
||||
assert not response.is_closed
|
||||
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
|
||||
|
|
@ -68,8 +68,8 @@ class TestLockdowns:
|
|||
with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"):
|
||||
client.firewall.lockdowns.with_raw_response.create(
|
||||
zone_id="",
|
||||
configurations=[{}, {}, {}],
|
||||
urls=["shop.example.com/*", "shop.example.com/*", "shop.example.com/*"],
|
||||
configurations=[{}],
|
||||
urls=["shop.example.com/*"],
|
||||
)
|
||||
|
||||
@pytest.mark.skip(reason="TODO: investigate broken test")
|
||||
|
|
@ -78,8 +78,8 @@ class TestLockdowns:
|
|||
lockdown = client.firewall.lockdowns.update(
|
||||
lock_downs_id="372e67954025e0ba6aaa6d586b9e0b59",
|
||||
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
|
||||
configurations=[{}, {}, {}],
|
||||
urls=["shop.example.com/*", "shop.example.com/*", "shop.example.com/*"],
|
||||
configurations=[{}],
|
||||
urls=["shop.example.com/*"],
|
||||
)
|
||||
assert_matches_type(Lockdown, lockdown, path=["response"])
|
||||
|
||||
|
|
@ -89,8 +89,8 @@ class TestLockdowns:
|
|||
response = client.firewall.lockdowns.with_raw_response.update(
|
||||
lock_downs_id="372e67954025e0ba6aaa6d586b9e0b59",
|
||||
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
|
||||
configurations=[{}, {}, {}],
|
||||
urls=["shop.example.com/*", "shop.example.com/*", "shop.example.com/*"],
|
||||
configurations=[{}],
|
||||
urls=["shop.example.com/*"],
|
||||
)
|
||||
|
||||
assert response.is_closed is True
|
||||
|
|
@ -104,8 +104,8 @@ class TestLockdowns:
|
|||
with client.firewall.lockdowns.with_streaming_response.update(
|
||||
lock_downs_id="372e67954025e0ba6aaa6d586b9e0b59",
|
||||
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
|
||||
configurations=[{}, {}, {}],
|
||||
urls=["shop.example.com/*", "shop.example.com/*", "shop.example.com/*"],
|
||||
configurations=[{}],
|
||||
urls=["shop.example.com/*"],
|
||||
) as response:
|
||||
assert not response.is_closed
|
||||
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
|
||||
|
|
@ -122,16 +122,16 @@ class TestLockdowns:
|
|||
client.firewall.lockdowns.with_raw_response.update(
|
||||
lock_downs_id="372e67954025e0ba6aaa6d586b9e0b59",
|
||||
zone_id="",
|
||||
configurations=[{}, {}, {}],
|
||||
urls=["shop.example.com/*", "shop.example.com/*", "shop.example.com/*"],
|
||||
configurations=[{}],
|
||||
urls=["shop.example.com/*"],
|
||||
)
|
||||
|
||||
with pytest.raises(ValueError, match=r"Expected a non-empty value for `lock_downs_id` but received ''"):
|
||||
client.firewall.lockdowns.with_raw_response.update(
|
||||
lock_downs_id="",
|
||||
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
|
||||
configurations=[{}, {}, {}],
|
||||
urls=["shop.example.com/*", "shop.example.com/*", "shop.example.com/*"],
|
||||
configurations=[{}],
|
||||
urls=["shop.example.com/*"],
|
||||
)
|
||||
|
||||
@parametrize
|
||||
|
|
@ -295,8 +295,8 @@ class TestAsyncLockdowns:
|
|||
async def test_method_create(self, async_client: AsyncCloudflare) -> None:
|
||||
lockdown = await async_client.firewall.lockdowns.create(
|
||||
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
|
||||
configurations=[{}, {}, {}],
|
||||
urls=["shop.example.com/*", "shop.example.com/*", "shop.example.com/*"],
|
||||
configurations=[{}],
|
||||
urls=["shop.example.com/*"],
|
||||
)
|
||||
assert_matches_type(Lockdown, lockdown, path=["response"])
|
||||
|
||||
|
|
@ -305,8 +305,8 @@ class TestAsyncLockdowns:
|
|||
async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None:
|
||||
response = await async_client.firewall.lockdowns.with_raw_response.create(
|
||||
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
|
||||
configurations=[{}, {}, {}],
|
||||
urls=["shop.example.com/*", "shop.example.com/*", "shop.example.com/*"],
|
||||
configurations=[{}],
|
||||
urls=["shop.example.com/*"],
|
||||
)
|
||||
|
||||
assert response.is_closed is True
|
||||
|
|
@ -319,8 +319,8 @@ class TestAsyncLockdowns:
|
|||
async def test_streaming_response_create(self, async_client: AsyncCloudflare) -> None:
|
||||
async with async_client.firewall.lockdowns.with_streaming_response.create(
|
||||
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
|
||||
configurations=[{}, {}, {}],
|
||||
urls=["shop.example.com/*", "shop.example.com/*", "shop.example.com/*"],
|
||||
configurations=[{}],
|
||||
urls=["shop.example.com/*"],
|
||||
) as response:
|
||||
assert not response.is_closed
|
||||
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
|
||||
|
|
@ -336,8 +336,8 @@ class TestAsyncLockdowns:
|
|||
with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"):
|
||||
await async_client.firewall.lockdowns.with_raw_response.create(
|
||||
zone_id="",
|
||||
configurations=[{}, {}, {}],
|
||||
urls=["shop.example.com/*", "shop.example.com/*", "shop.example.com/*"],
|
||||
configurations=[{}],
|
||||
urls=["shop.example.com/*"],
|
||||
)
|
||||
|
||||
@pytest.mark.skip(reason="TODO: investigate broken test")
|
||||
|
|
@ -346,8 +346,8 @@ class TestAsyncLockdowns:
|
|||
lockdown = await async_client.firewall.lockdowns.update(
|
||||
lock_downs_id="372e67954025e0ba6aaa6d586b9e0b59",
|
||||
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
|
||||
configurations=[{}, {}, {}],
|
||||
urls=["shop.example.com/*", "shop.example.com/*", "shop.example.com/*"],
|
||||
configurations=[{}],
|
||||
urls=["shop.example.com/*"],
|
||||
)
|
||||
assert_matches_type(Lockdown, lockdown, path=["response"])
|
||||
|
||||
|
|
@ -357,8 +357,8 @@ class TestAsyncLockdowns:
|
|||
response = await async_client.firewall.lockdowns.with_raw_response.update(
|
||||
lock_downs_id="372e67954025e0ba6aaa6d586b9e0b59",
|
||||
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
|
||||
configurations=[{}, {}, {}],
|
||||
urls=["shop.example.com/*", "shop.example.com/*", "shop.example.com/*"],
|
||||
configurations=[{}],
|
||||
urls=["shop.example.com/*"],
|
||||
)
|
||||
|
||||
assert response.is_closed is True
|
||||
|
|
@ -372,8 +372,8 @@ class TestAsyncLockdowns:
|
|||
async with async_client.firewall.lockdowns.with_streaming_response.update(
|
||||
lock_downs_id="372e67954025e0ba6aaa6d586b9e0b59",
|
||||
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
|
||||
configurations=[{}, {}, {}],
|
||||
urls=["shop.example.com/*", "shop.example.com/*", "shop.example.com/*"],
|
||||
configurations=[{}],
|
||||
urls=["shop.example.com/*"],
|
||||
) as response:
|
||||
assert not response.is_closed
|
||||
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
|
||||
|
|
@ -390,16 +390,16 @@ class TestAsyncLockdowns:
|
|||
await async_client.firewall.lockdowns.with_raw_response.update(
|
||||
lock_downs_id="372e67954025e0ba6aaa6d586b9e0b59",
|
||||
zone_id="",
|
||||
configurations=[{}, {}, {}],
|
||||
urls=["shop.example.com/*", "shop.example.com/*", "shop.example.com/*"],
|
||||
configurations=[{}],
|
||||
urls=["shop.example.com/*"],
|
||||
)
|
||||
|
||||
with pytest.raises(ValueError, match=r"Expected a non-empty value for `lock_downs_id` but received ''"):
|
||||
await async_client.firewall.lockdowns.with_raw_response.update(
|
||||
lock_downs_id="",
|
||||
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
|
||||
configurations=[{}, {}, {}],
|
||||
urls=["shop.example.com/*", "shop.example.com/*", "shop.example.com/*"],
|
||||
configurations=[{}],
|
||||
urls=["shop.example.com/*"],
|
||||
)
|
||||
|
||||
@parametrize
|
||||
|
|
|
|||
|
|
@ -26,7 +26,7 @@ class TestOverrides:
|
|||
def test_method_create(self, client: Cloudflare) -> None:
|
||||
override = client.firewall.waf.overrides.create(
|
||||
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
|
||||
urls=["shop.example.com/*", "shop.example.com/*", "shop.example.com/*"],
|
||||
urls=["shop.example.com/*"],
|
||||
)
|
||||
assert_matches_type(Override, override, path=["response"])
|
||||
|
||||
|
|
@ -35,7 +35,7 @@ class TestOverrides:
|
|||
def test_raw_response_create(self, client: Cloudflare) -> None:
|
||||
response = client.firewall.waf.overrides.with_raw_response.create(
|
||||
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
|
||||
urls=["shop.example.com/*", "shop.example.com/*", "shop.example.com/*"],
|
||||
urls=["shop.example.com/*"],
|
||||
)
|
||||
|
||||
assert response.is_closed is True
|
||||
|
|
@ -48,7 +48,7 @@ class TestOverrides:
|
|||
def test_streaming_response_create(self, client: Cloudflare) -> None:
|
||||
with client.firewall.waf.overrides.with_streaming_response.create(
|
||||
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
|
||||
urls=["shop.example.com/*", "shop.example.com/*", "shop.example.com/*"],
|
||||
urls=["shop.example.com/*"],
|
||||
) as response:
|
||||
assert not response.is_closed
|
||||
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
|
||||
|
|
@ -64,7 +64,7 @@ class TestOverrides:
|
|||
with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"):
|
||||
client.firewall.waf.overrides.with_raw_response.create(
|
||||
zone_id="",
|
||||
urls=["shop.example.com/*", "shop.example.com/*", "shop.example.com/*"],
|
||||
urls=["shop.example.com/*"],
|
||||
)
|
||||
|
||||
@pytest.mark.skip(reason="TODO: investigate broken test")
|
||||
|
|
@ -76,7 +76,7 @@ class TestOverrides:
|
|||
id="023e105f4ecef8ad9ca31a8372d0c353",
|
||||
rewrite_action={},
|
||||
rules={"100015": "challenge"},
|
||||
urls=["shop.example.com/*", "shop.example.com/*", "shop.example.com/*"],
|
||||
urls=["shop.example.com/*"],
|
||||
)
|
||||
assert_matches_type(Override, override, path=["response"])
|
||||
|
||||
|
|
@ -95,7 +95,7 @@ class TestOverrides:
|
|||
"simulate": "challenge",
|
||||
},
|
||||
rules={"100015": "challenge"},
|
||||
urls=["shop.example.com/*", "shop.example.com/*", "shop.example.com/*"],
|
||||
urls=["shop.example.com/*"],
|
||||
)
|
||||
assert_matches_type(Override, override, path=["response"])
|
||||
|
||||
|
|
@ -108,7 +108,7 @@ class TestOverrides:
|
|||
id="023e105f4ecef8ad9ca31a8372d0c353",
|
||||
rewrite_action={},
|
||||
rules={"100015": "challenge"},
|
||||
urls=["shop.example.com/*", "shop.example.com/*", "shop.example.com/*"],
|
||||
urls=["shop.example.com/*"],
|
||||
)
|
||||
|
||||
assert response.is_closed is True
|
||||
|
|
@ -125,7 +125,7 @@ class TestOverrides:
|
|||
id="023e105f4ecef8ad9ca31a8372d0c353",
|
||||
rewrite_action={},
|
||||
rules={"100015": "challenge"},
|
||||
urls=["shop.example.com/*", "shop.example.com/*", "shop.example.com/*"],
|
||||
urls=["shop.example.com/*"],
|
||||
) as response:
|
||||
assert not response.is_closed
|
||||
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
|
||||
|
|
@ -145,7 +145,7 @@ class TestOverrides:
|
|||
id="023e105f4ecef8ad9ca31a8372d0c353",
|
||||
rewrite_action={},
|
||||
rules={"100015": "challenge"},
|
||||
urls=["shop.example.com/*", "shop.example.com/*", "shop.example.com/*"],
|
||||
urls=["shop.example.com/*"],
|
||||
)
|
||||
|
||||
with pytest.raises(ValueError, match=r"Expected a non-empty value for `overrides_id` but received ''"):
|
||||
|
|
@ -155,7 +155,7 @@ class TestOverrides:
|
|||
id="023e105f4ecef8ad9ca31a8372d0c353",
|
||||
rewrite_action={},
|
||||
rules={"100015": "challenge"},
|
||||
urls=["shop.example.com/*", "shop.example.com/*", "shop.example.com/*"],
|
||||
urls=["shop.example.com/*"],
|
||||
)
|
||||
|
||||
@parametrize
|
||||
|
|
@ -310,7 +310,7 @@ class TestAsyncOverrides:
|
|||
async def test_method_create(self, async_client: AsyncCloudflare) -> None:
|
||||
override = await async_client.firewall.waf.overrides.create(
|
||||
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
|
||||
urls=["shop.example.com/*", "shop.example.com/*", "shop.example.com/*"],
|
||||
urls=["shop.example.com/*"],
|
||||
)
|
||||
assert_matches_type(Override, override, path=["response"])
|
||||
|
||||
|
|
@ -319,7 +319,7 @@ class TestAsyncOverrides:
|
|||
async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None:
|
||||
response = await async_client.firewall.waf.overrides.with_raw_response.create(
|
||||
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
|
||||
urls=["shop.example.com/*", "shop.example.com/*", "shop.example.com/*"],
|
||||
urls=["shop.example.com/*"],
|
||||
)
|
||||
|
||||
assert response.is_closed is True
|
||||
|
|
@ -332,7 +332,7 @@ class TestAsyncOverrides:
|
|||
async def test_streaming_response_create(self, async_client: AsyncCloudflare) -> None:
|
||||
async with async_client.firewall.waf.overrides.with_streaming_response.create(
|
||||
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
|
||||
urls=["shop.example.com/*", "shop.example.com/*", "shop.example.com/*"],
|
||||
urls=["shop.example.com/*"],
|
||||
) as response:
|
||||
assert not response.is_closed
|
||||
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
|
||||
|
|
@ -348,7 +348,7 @@ class TestAsyncOverrides:
|
|||
with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"):
|
||||
await async_client.firewall.waf.overrides.with_raw_response.create(
|
||||
zone_id="",
|
||||
urls=["shop.example.com/*", "shop.example.com/*", "shop.example.com/*"],
|
||||
urls=["shop.example.com/*"],
|
||||
)
|
||||
|
||||
@pytest.mark.skip(reason="TODO: investigate broken test")
|
||||
|
|
@ -360,7 +360,7 @@ class TestAsyncOverrides:
|
|||
id="023e105f4ecef8ad9ca31a8372d0c353",
|
||||
rewrite_action={},
|
||||
rules={"100015": "challenge"},
|
||||
urls=["shop.example.com/*", "shop.example.com/*", "shop.example.com/*"],
|
||||
urls=["shop.example.com/*"],
|
||||
)
|
||||
assert_matches_type(Override, override, path=["response"])
|
||||
|
||||
|
|
@ -379,7 +379,7 @@ class TestAsyncOverrides:
|
|||
"simulate": "challenge",
|
||||
},
|
||||
rules={"100015": "challenge"},
|
||||
urls=["shop.example.com/*", "shop.example.com/*", "shop.example.com/*"],
|
||||
urls=["shop.example.com/*"],
|
||||
)
|
||||
assert_matches_type(Override, override, path=["response"])
|
||||
|
||||
|
|
@ -392,7 +392,7 @@ class TestAsyncOverrides:
|
|||
id="023e105f4ecef8ad9ca31a8372d0c353",
|
||||
rewrite_action={},
|
||||
rules={"100015": "challenge"},
|
||||
urls=["shop.example.com/*", "shop.example.com/*", "shop.example.com/*"],
|
||||
urls=["shop.example.com/*"],
|
||||
)
|
||||
|
||||
assert response.is_closed is True
|
||||
|
|
@ -409,7 +409,7 @@ class TestAsyncOverrides:
|
|||
id="023e105f4ecef8ad9ca31a8372d0c353",
|
||||
rewrite_action={},
|
||||
rules={"100015": "challenge"},
|
||||
urls=["shop.example.com/*", "shop.example.com/*", "shop.example.com/*"],
|
||||
urls=["shop.example.com/*"],
|
||||
) as response:
|
||||
assert not response.is_closed
|
||||
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
|
||||
|
|
@ -429,7 +429,7 @@ class TestAsyncOverrides:
|
|||
id="023e105f4ecef8ad9ca31a8372d0c353",
|
||||
rewrite_action={},
|
||||
rules={"100015": "challenge"},
|
||||
urls=["shop.example.com/*", "shop.example.com/*", "shop.example.com/*"],
|
||||
urls=["shop.example.com/*"],
|
||||
)
|
||||
|
||||
with pytest.raises(ValueError, match=r"Expected a non-empty value for `overrides_id` but received ''"):
|
||||
|
|
@ -439,7 +439,7 @@ class TestAsyncOverrides:
|
|||
id="023e105f4ecef8ad9ca31a8372d0c353",
|
||||
rewrite_action={},
|
||||
rules={"100015": "challenge"},
|
||||
urls=["shop.example.com/*", "shop.example.com/*", "shop.example.com/*"],
|
||||
urls=["shop.example.com/*"],
|
||||
)
|
||||
|
||||
@parametrize
|
||||
|
|
|
|||
|
|
@ -29,11 +29,7 @@ class TestResourceGroups:
|
|||
account_id="eb78d65290b24279ba6f44721b3ea3c4",
|
||||
scope={
|
||||
"key": "com.cloudflare.api.account.eb78d65290b24279ba6f44721b3ea3c4",
|
||||
"objects": [
|
||||
{"key": "com.cloudflare.api.account.zone.23f8d65290b24279ba6f44721b3eaad5"},
|
||||
{"key": "com.cloudflare.api.account.zone.23f8d65290b24279ba6f44721b3eaad5"},
|
||||
{"key": "com.cloudflare.api.account.zone.23f8d65290b24279ba6f44721b3eaad5"},
|
||||
],
|
||||
"objects": [{"key": "com.cloudflare.api.account.zone.23f8d65290b24279ba6f44721b3eaad5"}],
|
||||
},
|
||||
)
|
||||
assert_matches_type(ResourceGroupCreateResponse, resource_group, path=["response"])
|
||||
|
|
@ -44,11 +40,7 @@ class TestResourceGroups:
|
|||
account_id="eb78d65290b24279ba6f44721b3ea3c4",
|
||||
scope={
|
||||
"key": "com.cloudflare.api.account.eb78d65290b24279ba6f44721b3ea3c4",
|
||||
"objects": [
|
||||
{"key": "com.cloudflare.api.account.zone.23f8d65290b24279ba6f44721b3eaad5"},
|
||||
{"key": "com.cloudflare.api.account.zone.23f8d65290b24279ba6f44721b3eaad5"},
|
||||
{"key": "com.cloudflare.api.account.zone.23f8d65290b24279ba6f44721b3eaad5"},
|
||||
],
|
||||
"objects": [{"key": "com.cloudflare.api.account.zone.23f8d65290b24279ba6f44721b3eaad5"}],
|
||||
},
|
||||
meta={"editable": "false"},
|
||||
)
|
||||
|
|
@ -60,11 +52,7 @@ class TestResourceGroups:
|
|||
account_id="eb78d65290b24279ba6f44721b3ea3c4",
|
||||
scope={
|
||||
"key": "com.cloudflare.api.account.eb78d65290b24279ba6f44721b3ea3c4",
|
||||
"objects": [
|
||||
{"key": "com.cloudflare.api.account.zone.23f8d65290b24279ba6f44721b3eaad5"},
|
||||
{"key": "com.cloudflare.api.account.zone.23f8d65290b24279ba6f44721b3eaad5"},
|
||||
{"key": "com.cloudflare.api.account.zone.23f8d65290b24279ba6f44721b3eaad5"},
|
||||
],
|
||||
"objects": [{"key": "com.cloudflare.api.account.zone.23f8d65290b24279ba6f44721b3eaad5"}],
|
||||
},
|
||||
)
|
||||
|
||||
|
|
@ -79,11 +67,7 @@ class TestResourceGroups:
|
|||
account_id="eb78d65290b24279ba6f44721b3ea3c4",
|
||||
scope={
|
||||
"key": "com.cloudflare.api.account.eb78d65290b24279ba6f44721b3ea3c4",
|
||||
"objects": [
|
||||
{"key": "com.cloudflare.api.account.zone.23f8d65290b24279ba6f44721b3eaad5"},
|
||||
{"key": "com.cloudflare.api.account.zone.23f8d65290b24279ba6f44721b3eaad5"},
|
||||
{"key": "com.cloudflare.api.account.zone.23f8d65290b24279ba6f44721b3eaad5"},
|
||||
],
|
||||
"objects": [{"key": "com.cloudflare.api.account.zone.23f8d65290b24279ba6f44721b3eaad5"}],
|
||||
},
|
||||
) as response:
|
||||
assert not response.is_closed
|
||||
|
|
@ -101,11 +85,7 @@ class TestResourceGroups:
|
|||
account_id="",
|
||||
scope={
|
||||
"key": "com.cloudflare.api.account.eb78d65290b24279ba6f44721b3ea3c4",
|
||||
"objects": [
|
||||
{"key": "com.cloudflare.api.account.zone.23f8d65290b24279ba6f44721b3eaad5"},
|
||||
{"key": "com.cloudflare.api.account.zone.23f8d65290b24279ba6f44721b3eaad5"},
|
||||
{"key": "com.cloudflare.api.account.zone.23f8d65290b24279ba6f44721b3eaad5"},
|
||||
],
|
||||
"objects": [{"key": "com.cloudflare.api.account.zone.23f8d65290b24279ba6f44721b3eaad5"}],
|
||||
},
|
||||
)
|
||||
|
||||
|
|
@ -116,11 +96,7 @@ class TestResourceGroups:
|
|||
account_id="eb78d65290b24279ba6f44721b3ea3c4",
|
||||
scope={
|
||||
"key": "com.cloudflare.api.account.eb78d65290b24279ba6f44721b3ea3c4",
|
||||
"objects": [
|
||||
{"key": "com.cloudflare.api.account.zone.23f8d65290b24279ba6f44721b3eaad5"},
|
||||
{"key": "com.cloudflare.api.account.zone.23f8d65290b24279ba6f44721b3eaad5"},
|
||||
{"key": "com.cloudflare.api.account.zone.23f8d65290b24279ba6f44721b3eaad5"},
|
||||
],
|
||||
"objects": [{"key": "com.cloudflare.api.account.zone.23f8d65290b24279ba6f44721b3eaad5"}],
|
||||
},
|
||||
)
|
||||
assert_matches_type(ResourceGroupUpdateResponse, resource_group, path=["response"])
|
||||
|
|
@ -132,11 +108,7 @@ class TestResourceGroups:
|
|||
account_id="eb78d65290b24279ba6f44721b3ea3c4",
|
||||
scope={
|
||||
"key": "com.cloudflare.api.account.eb78d65290b24279ba6f44721b3ea3c4",
|
||||
"objects": [
|
||||
{"key": "com.cloudflare.api.account.zone.23f8d65290b24279ba6f44721b3eaad5"},
|
||||
{"key": "com.cloudflare.api.account.zone.23f8d65290b24279ba6f44721b3eaad5"},
|
||||
{"key": "com.cloudflare.api.account.zone.23f8d65290b24279ba6f44721b3eaad5"},
|
||||
],
|
||||
"objects": [{"key": "com.cloudflare.api.account.zone.23f8d65290b24279ba6f44721b3eaad5"}],
|
||||
},
|
||||
meta={"editable": "false"},
|
||||
)
|
||||
|
|
@ -149,11 +121,7 @@ class TestResourceGroups:
|
|||
account_id="eb78d65290b24279ba6f44721b3ea3c4",
|
||||
scope={
|
||||
"key": "com.cloudflare.api.account.eb78d65290b24279ba6f44721b3ea3c4",
|
||||
"objects": [
|
||||
{"key": "com.cloudflare.api.account.zone.23f8d65290b24279ba6f44721b3eaad5"},
|
||||
{"key": "com.cloudflare.api.account.zone.23f8d65290b24279ba6f44721b3eaad5"},
|
||||
{"key": "com.cloudflare.api.account.zone.23f8d65290b24279ba6f44721b3eaad5"},
|
||||
],
|
||||
"objects": [{"key": "com.cloudflare.api.account.zone.23f8d65290b24279ba6f44721b3eaad5"}],
|
||||
},
|
||||
)
|
||||
|
||||
|
|
@ -169,11 +137,7 @@ class TestResourceGroups:
|
|||
account_id="eb78d65290b24279ba6f44721b3ea3c4",
|
||||
scope={
|
||||
"key": "com.cloudflare.api.account.eb78d65290b24279ba6f44721b3ea3c4",
|
||||
"objects": [
|
||||
{"key": "com.cloudflare.api.account.zone.23f8d65290b24279ba6f44721b3eaad5"},
|
||||
{"key": "com.cloudflare.api.account.zone.23f8d65290b24279ba6f44721b3eaad5"},
|
||||
{"key": "com.cloudflare.api.account.zone.23f8d65290b24279ba6f44721b3eaad5"},
|
||||
],
|
||||
"objects": [{"key": "com.cloudflare.api.account.zone.23f8d65290b24279ba6f44721b3eaad5"}],
|
||||
},
|
||||
) as response:
|
||||
assert not response.is_closed
|
||||
|
|
@ -192,11 +156,7 @@ class TestResourceGroups:
|
|||
account_id="",
|
||||
scope={
|
||||
"key": "com.cloudflare.api.account.eb78d65290b24279ba6f44721b3ea3c4",
|
||||
"objects": [
|
||||
{"key": "com.cloudflare.api.account.zone.23f8d65290b24279ba6f44721b3eaad5"},
|
||||
{"key": "com.cloudflare.api.account.zone.23f8d65290b24279ba6f44721b3eaad5"},
|
||||
{"key": "com.cloudflare.api.account.zone.23f8d65290b24279ba6f44721b3eaad5"},
|
||||
],
|
||||
"objects": [{"key": "com.cloudflare.api.account.zone.23f8d65290b24279ba6f44721b3eaad5"}],
|
||||
},
|
||||
)
|
||||
|
||||
|
|
@ -206,11 +166,7 @@ class TestResourceGroups:
|
|||
account_id="eb78d65290b24279ba6f44721b3ea3c4",
|
||||
scope={
|
||||
"key": "com.cloudflare.api.account.eb78d65290b24279ba6f44721b3ea3c4",
|
||||
"objects": [
|
||||
{"key": "com.cloudflare.api.account.zone.23f8d65290b24279ba6f44721b3eaad5"},
|
||||
{"key": "com.cloudflare.api.account.zone.23f8d65290b24279ba6f44721b3eaad5"},
|
||||
{"key": "com.cloudflare.api.account.zone.23f8d65290b24279ba6f44721b3eaad5"},
|
||||
],
|
||||
"objects": [{"key": "com.cloudflare.api.account.zone.23f8d65290b24279ba6f44721b3eaad5"}],
|
||||
},
|
||||
)
|
||||
|
||||
|
|
@ -369,11 +325,7 @@ class TestAsyncResourceGroups:
|
|||
account_id="eb78d65290b24279ba6f44721b3ea3c4",
|
||||
scope={
|
||||
"key": "com.cloudflare.api.account.eb78d65290b24279ba6f44721b3ea3c4",
|
||||
"objects": [
|
||||
{"key": "com.cloudflare.api.account.zone.23f8d65290b24279ba6f44721b3eaad5"},
|
||||
{"key": "com.cloudflare.api.account.zone.23f8d65290b24279ba6f44721b3eaad5"},
|
||||
{"key": "com.cloudflare.api.account.zone.23f8d65290b24279ba6f44721b3eaad5"},
|
||||
],
|
||||
"objects": [{"key": "com.cloudflare.api.account.zone.23f8d65290b24279ba6f44721b3eaad5"}],
|
||||
},
|
||||
)
|
||||
assert_matches_type(ResourceGroupCreateResponse, resource_group, path=["response"])
|
||||
|
|
@ -384,11 +336,7 @@ class TestAsyncResourceGroups:
|
|||
account_id="eb78d65290b24279ba6f44721b3ea3c4",
|
||||
scope={
|
||||
"key": "com.cloudflare.api.account.eb78d65290b24279ba6f44721b3ea3c4",
|
||||
"objects": [
|
||||
{"key": "com.cloudflare.api.account.zone.23f8d65290b24279ba6f44721b3eaad5"},
|
||||
{"key": "com.cloudflare.api.account.zone.23f8d65290b24279ba6f44721b3eaad5"},
|
||||
{"key": "com.cloudflare.api.account.zone.23f8d65290b24279ba6f44721b3eaad5"},
|
||||
],
|
||||
"objects": [{"key": "com.cloudflare.api.account.zone.23f8d65290b24279ba6f44721b3eaad5"}],
|
||||
},
|
||||
meta={"editable": "false"},
|
||||
)
|
||||
|
|
@ -400,11 +348,7 @@ class TestAsyncResourceGroups:
|
|||
account_id="eb78d65290b24279ba6f44721b3ea3c4",
|
||||
scope={
|
||||
"key": "com.cloudflare.api.account.eb78d65290b24279ba6f44721b3ea3c4",
|
||||
"objects": [
|
||||
{"key": "com.cloudflare.api.account.zone.23f8d65290b24279ba6f44721b3eaad5"},
|
||||
{"key": "com.cloudflare.api.account.zone.23f8d65290b24279ba6f44721b3eaad5"},
|
||||
{"key": "com.cloudflare.api.account.zone.23f8d65290b24279ba6f44721b3eaad5"},
|
||||
],
|
||||
"objects": [{"key": "com.cloudflare.api.account.zone.23f8d65290b24279ba6f44721b3eaad5"}],
|
||||
},
|
||||
)
|
||||
|
||||
|
|
@ -419,11 +363,7 @@ class TestAsyncResourceGroups:
|
|||
account_id="eb78d65290b24279ba6f44721b3ea3c4",
|
||||
scope={
|
||||
"key": "com.cloudflare.api.account.eb78d65290b24279ba6f44721b3ea3c4",
|
||||
"objects": [
|
||||
{"key": "com.cloudflare.api.account.zone.23f8d65290b24279ba6f44721b3eaad5"},
|
||||
{"key": "com.cloudflare.api.account.zone.23f8d65290b24279ba6f44721b3eaad5"},
|
||||
{"key": "com.cloudflare.api.account.zone.23f8d65290b24279ba6f44721b3eaad5"},
|
||||
],
|
||||
"objects": [{"key": "com.cloudflare.api.account.zone.23f8d65290b24279ba6f44721b3eaad5"}],
|
||||
},
|
||||
) as response:
|
||||
assert not response.is_closed
|
||||
|
|
@ -441,11 +381,7 @@ class TestAsyncResourceGroups:
|
|||
account_id="",
|
||||
scope={
|
||||
"key": "com.cloudflare.api.account.eb78d65290b24279ba6f44721b3ea3c4",
|
||||
"objects": [
|
||||
{"key": "com.cloudflare.api.account.zone.23f8d65290b24279ba6f44721b3eaad5"},
|
||||
{"key": "com.cloudflare.api.account.zone.23f8d65290b24279ba6f44721b3eaad5"},
|
||||
{"key": "com.cloudflare.api.account.zone.23f8d65290b24279ba6f44721b3eaad5"},
|
||||
],
|
||||
"objects": [{"key": "com.cloudflare.api.account.zone.23f8d65290b24279ba6f44721b3eaad5"}],
|
||||
},
|
||||
)
|
||||
|
||||
|
|
@ -456,11 +392,7 @@ class TestAsyncResourceGroups:
|
|||
account_id="eb78d65290b24279ba6f44721b3ea3c4",
|
||||
scope={
|
||||
"key": "com.cloudflare.api.account.eb78d65290b24279ba6f44721b3ea3c4",
|
||||
"objects": [
|
||||
{"key": "com.cloudflare.api.account.zone.23f8d65290b24279ba6f44721b3eaad5"},
|
||||
{"key": "com.cloudflare.api.account.zone.23f8d65290b24279ba6f44721b3eaad5"},
|
||||
{"key": "com.cloudflare.api.account.zone.23f8d65290b24279ba6f44721b3eaad5"},
|
||||
],
|
||||
"objects": [{"key": "com.cloudflare.api.account.zone.23f8d65290b24279ba6f44721b3eaad5"}],
|
||||
},
|
||||
)
|
||||
assert_matches_type(ResourceGroupUpdateResponse, resource_group, path=["response"])
|
||||
|
|
@ -472,11 +404,7 @@ class TestAsyncResourceGroups:
|
|||
account_id="eb78d65290b24279ba6f44721b3ea3c4",
|
||||
scope={
|
||||
"key": "com.cloudflare.api.account.eb78d65290b24279ba6f44721b3ea3c4",
|
||||
"objects": [
|
||||
{"key": "com.cloudflare.api.account.zone.23f8d65290b24279ba6f44721b3eaad5"},
|
||||
{"key": "com.cloudflare.api.account.zone.23f8d65290b24279ba6f44721b3eaad5"},
|
||||
{"key": "com.cloudflare.api.account.zone.23f8d65290b24279ba6f44721b3eaad5"},
|
||||
],
|
||||
"objects": [{"key": "com.cloudflare.api.account.zone.23f8d65290b24279ba6f44721b3eaad5"}],
|
||||
},
|
||||
meta={"editable": "false"},
|
||||
)
|
||||
|
|
@ -489,11 +417,7 @@ class TestAsyncResourceGroups:
|
|||
account_id="eb78d65290b24279ba6f44721b3ea3c4",
|
||||
scope={
|
||||
"key": "com.cloudflare.api.account.eb78d65290b24279ba6f44721b3ea3c4",
|
||||
"objects": [
|
||||
{"key": "com.cloudflare.api.account.zone.23f8d65290b24279ba6f44721b3eaad5"},
|
||||
{"key": "com.cloudflare.api.account.zone.23f8d65290b24279ba6f44721b3eaad5"},
|
||||
{"key": "com.cloudflare.api.account.zone.23f8d65290b24279ba6f44721b3eaad5"},
|
||||
],
|
||||
"objects": [{"key": "com.cloudflare.api.account.zone.23f8d65290b24279ba6f44721b3eaad5"}],
|
||||
},
|
||||
)
|
||||
|
||||
|
|
@ -509,11 +433,7 @@ class TestAsyncResourceGroups:
|
|||
account_id="eb78d65290b24279ba6f44721b3ea3c4",
|
||||
scope={
|
||||
"key": "com.cloudflare.api.account.eb78d65290b24279ba6f44721b3ea3c4",
|
||||
"objects": [
|
||||
{"key": "com.cloudflare.api.account.zone.23f8d65290b24279ba6f44721b3eaad5"},
|
||||
{"key": "com.cloudflare.api.account.zone.23f8d65290b24279ba6f44721b3eaad5"},
|
||||
{"key": "com.cloudflare.api.account.zone.23f8d65290b24279ba6f44721b3eaad5"},
|
||||
],
|
||||
"objects": [{"key": "com.cloudflare.api.account.zone.23f8d65290b24279ba6f44721b3eaad5"}],
|
||||
},
|
||||
) as response:
|
||||
assert not response.is_closed
|
||||
|
|
@ -532,11 +452,7 @@ class TestAsyncResourceGroups:
|
|||
account_id="",
|
||||
scope={
|
||||
"key": "com.cloudflare.api.account.eb78d65290b24279ba6f44721b3ea3c4",
|
||||
"objects": [
|
||||
{"key": "com.cloudflare.api.account.zone.23f8d65290b24279ba6f44721b3eaad5"},
|
||||
{"key": "com.cloudflare.api.account.zone.23f8d65290b24279ba6f44721b3eaad5"},
|
||||
{"key": "com.cloudflare.api.account.zone.23f8d65290b24279ba6f44721b3eaad5"},
|
||||
],
|
||||
"objects": [{"key": "com.cloudflare.api.account.zone.23f8d65290b24279ba6f44721b3eaad5"}],
|
||||
},
|
||||
)
|
||||
|
||||
|
|
@ -546,11 +462,7 @@ class TestAsyncResourceGroups:
|
|||
account_id="eb78d65290b24279ba6f44721b3ea3c4",
|
||||
scope={
|
||||
"key": "com.cloudflare.api.account.eb78d65290b24279ba6f44721b3ea3c4",
|
||||
"objects": [
|
||||
{"key": "com.cloudflare.api.account.zone.23f8d65290b24279ba6f44721b3eaad5"},
|
||||
{"key": "com.cloudflare.api.account.zone.23f8d65290b24279ba6f44721b3eaad5"},
|
||||
{"key": "com.cloudflare.api.account.zone.23f8d65290b24279ba6f44721b3eaad5"},
|
||||
],
|
||||
"objects": [{"key": "com.cloudflare.api.account.zone.23f8d65290b24279ba6f44721b3eaad5"}],
|
||||
},
|
||||
)
|
||||
|
||||
|
|
|
|||
|
|
@ -46,8 +46,8 @@ class TestIssues:
|
|||
product_neq=["access", "dns"],
|
||||
severity=["low", "moderate"],
|
||||
severity_neq=["low", "moderate"],
|
||||
subject=["example.com", "example.com", "example.com"],
|
||||
subject_neq=["example.com", "example.com", "example.com"],
|
||||
subject=["example.com"],
|
||||
subject_neq=["example.com"],
|
||||
)
|
||||
assert_matches_type(SyncV4PagePagination[IssueListResponse], issue, path=["response"])
|
||||
|
||||
|
|
@ -102,8 +102,8 @@ class TestIssues:
|
|||
product_neq=["access", "dns"],
|
||||
severity=["low", "moderate"],
|
||||
severity_neq=["low", "moderate"],
|
||||
subject=["example.com", "example.com", "example.com"],
|
||||
subject_neq=["example.com", "example.com", "example.com"],
|
||||
subject=["example.com"],
|
||||
subject_neq=["example.com"],
|
||||
)
|
||||
assert_matches_type(Optional[IssueClassResponse], issue, path=["response"])
|
||||
|
||||
|
|
@ -215,8 +215,8 @@ class TestIssues:
|
|||
product_neq=["access", "dns"],
|
||||
severity=["low", "moderate"],
|
||||
severity_neq=["low", "moderate"],
|
||||
subject=["example.com", "example.com", "example.com"],
|
||||
subject_neq=["example.com", "example.com", "example.com"],
|
||||
subject=["example.com"],
|
||||
subject_neq=["example.com"],
|
||||
)
|
||||
assert_matches_type(Optional[IssueSeverityResponse], issue, path=["response"])
|
||||
|
||||
|
|
@ -271,8 +271,8 @@ class TestIssues:
|
|||
product_neq=["access", "dns"],
|
||||
severity=["low", "moderate"],
|
||||
severity_neq=["low", "moderate"],
|
||||
subject=["example.com", "example.com", "example.com"],
|
||||
subject_neq=["example.com", "example.com", "example.com"],
|
||||
subject=["example.com"],
|
||||
subject_neq=["example.com"],
|
||||
)
|
||||
assert_matches_type(Optional[IssueTypeResponse], issue, path=["response"])
|
||||
|
||||
|
|
@ -333,8 +333,8 @@ class TestAsyncIssues:
|
|||
product_neq=["access", "dns"],
|
||||
severity=["low", "moderate"],
|
||||
severity_neq=["low", "moderate"],
|
||||
subject=["example.com", "example.com", "example.com"],
|
||||
subject_neq=["example.com", "example.com", "example.com"],
|
||||
subject=["example.com"],
|
||||
subject_neq=["example.com"],
|
||||
)
|
||||
assert_matches_type(AsyncV4PagePagination[IssueListResponse], issue, path=["response"])
|
||||
|
||||
|
|
@ -389,8 +389,8 @@ class TestAsyncIssues:
|
|||
product_neq=["access", "dns"],
|
||||
severity=["low", "moderate"],
|
||||
severity_neq=["low", "moderate"],
|
||||
subject=["example.com", "example.com", "example.com"],
|
||||
subject_neq=["example.com", "example.com", "example.com"],
|
||||
subject=["example.com"],
|
||||
subject_neq=["example.com"],
|
||||
)
|
||||
assert_matches_type(Optional[IssueClassResponse], issue, path=["response"])
|
||||
|
||||
|
|
@ -502,8 +502,8 @@ class TestAsyncIssues:
|
|||
product_neq=["access", "dns"],
|
||||
severity=["low", "moderate"],
|
||||
severity_neq=["low", "moderate"],
|
||||
subject=["example.com", "example.com", "example.com"],
|
||||
subject_neq=["example.com", "example.com", "example.com"],
|
||||
subject=["example.com"],
|
||||
subject_neq=["example.com"],
|
||||
)
|
||||
assert_matches_type(Optional[IssueSeverityResponse], issue, path=["response"])
|
||||
|
||||
|
|
@ -558,8 +558,8 @@ class TestAsyncIssues:
|
|||
product_neq=["access", "dns"],
|
||||
severity=["low", "moderate"],
|
||||
severity_neq=["low", "moderate"],
|
||||
subject=["example.com", "example.com", "example.com"],
|
||||
subject_neq=["example.com", "example.com", "example.com"],
|
||||
subject=["example.com"],
|
||||
subject_neq=["example.com"],
|
||||
)
|
||||
assert_matches_type(Optional[IssueTypeResponse], issue, path=["response"])
|
||||
|
||||
|
|
|
|||
|
|
@ -22,7 +22,7 @@ class TestBulk:
|
|||
bulk = client.kv.namespaces.bulk.update(
|
||||
namespace_id="0f2ac74b498b48028cb68387c421e279",
|
||||
account_id="023e105f4ecef8ad9ca31a8372d0c353",
|
||||
body=[{}, {}, {}],
|
||||
body=[{}],
|
||||
)
|
||||
assert_matches_type(Optional[BulkUpdateResponse], bulk, path=["response"])
|
||||
|
||||
|
|
@ -31,7 +31,7 @@ class TestBulk:
|
|||
response = client.kv.namespaces.bulk.with_raw_response.update(
|
||||
namespace_id="0f2ac74b498b48028cb68387c421e279",
|
||||
account_id="023e105f4ecef8ad9ca31a8372d0c353",
|
||||
body=[{}, {}, {}],
|
||||
body=[{}],
|
||||
)
|
||||
|
||||
assert response.is_closed is True
|
||||
|
|
@ -44,7 +44,7 @@ class TestBulk:
|
|||
with client.kv.namespaces.bulk.with_streaming_response.update(
|
||||
namespace_id="0f2ac74b498b48028cb68387c421e279",
|
||||
account_id="023e105f4ecef8ad9ca31a8372d0c353",
|
||||
body=[{}, {}, {}],
|
||||
body=[{}],
|
||||
) as response:
|
||||
assert not response.is_closed
|
||||
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
|
||||
|
|
@ -60,14 +60,14 @@ class TestBulk:
|
|||
client.kv.namespaces.bulk.with_raw_response.update(
|
||||
namespace_id="0f2ac74b498b48028cb68387c421e279",
|
||||
account_id="",
|
||||
body=[{}, {}, {}],
|
||||
body=[{}],
|
||||
)
|
||||
|
||||
with pytest.raises(ValueError, match=r"Expected a non-empty value for `namespace_id` but received ''"):
|
||||
client.kv.namespaces.bulk.with_raw_response.update(
|
||||
namespace_id="",
|
||||
account_id="023e105f4ecef8ad9ca31a8372d0c353",
|
||||
body=[{}, {}, {}],
|
||||
body=[{}],
|
||||
)
|
||||
|
||||
@parametrize
|
||||
|
|
@ -127,7 +127,7 @@ class TestAsyncBulk:
|
|||
bulk = await async_client.kv.namespaces.bulk.update(
|
||||
namespace_id="0f2ac74b498b48028cb68387c421e279",
|
||||
account_id="023e105f4ecef8ad9ca31a8372d0c353",
|
||||
body=[{}, {}, {}],
|
||||
body=[{}],
|
||||
)
|
||||
assert_matches_type(Optional[BulkUpdateResponse], bulk, path=["response"])
|
||||
|
||||
|
|
@ -136,7 +136,7 @@ class TestAsyncBulk:
|
|||
response = await async_client.kv.namespaces.bulk.with_raw_response.update(
|
||||
namespace_id="0f2ac74b498b48028cb68387c421e279",
|
||||
account_id="023e105f4ecef8ad9ca31a8372d0c353",
|
||||
body=[{}, {}, {}],
|
||||
body=[{}],
|
||||
)
|
||||
|
||||
assert response.is_closed is True
|
||||
|
|
@ -149,7 +149,7 @@ class TestAsyncBulk:
|
|||
async with async_client.kv.namespaces.bulk.with_streaming_response.update(
|
||||
namespace_id="0f2ac74b498b48028cb68387c421e279",
|
||||
account_id="023e105f4ecef8ad9ca31a8372d0c353",
|
||||
body=[{}, {}, {}],
|
||||
body=[{}],
|
||||
) as response:
|
||||
assert not response.is_closed
|
||||
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
|
||||
|
|
@ -165,14 +165,14 @@ class TestAsyncBulk:
|
|||
await async_client.kv.namespaces.bulk.with_raw_response.update(
|
||||
namespace_id="0f2ac74b498b48028cb68387c421e279",
|
||||
account_id="",
|
||||
body=[{}, {}, {}],
|
||||
body=[{}],
|
||||
)
|
||||
|
||||
with pytest.raises(ValueError, match=r"Expected a non-empty value for `namespace_id` but received ''"):
|
||||
await async_client.kv.namespaces.bulk.with_raw_response.update(
|
||||
namespace_id="",
|
||||
account_id="023e105f4ecef8ad9ca31a8372d0c353",
|
||||
body=[{}, {}, {}],
|
||||
body=[{}],
|
||||
)
|
||||
|
||||
@parametrize
|
||||
|
|
|
|||
|
|
@ -26,7 +26,7 @@ class TestPools:
|
|||
pool = client.load_balancers.pools.create(
|
||||
account_id="023e105f4ecef8ad9ca31a8372d0c353",
|
||||
name="primary-dc-1",
|
||||
origins=[{}, {}, {}],
|
||||
origins=[{}],
|
||||
)
|
||||
assert_matches_type(Pool, pool, path=["response"])
|
||||
|
||||
|
|
@ -39,27 +39,11 @@ class TestPools:
|
|||
{
|
||||
"address": "0.0.0.0",
|
||||
"enabled": True,
|
||||
"header": {"host": ["example.com", "example.com", "example.com"]},
|
||||
"header": {"host": ["example.com"]},
|
||||
"name": "app-server-1",
|
||||
"virtual_network_id": "a5624d4e-044a-4ff0-b3e1-e2465353d4b4",
|
||||
"weight": 0.6,
|
||||
},
|
||||
{
|
||||
"address": "0.0.0.0",
|
||||
"enabled": True,
|
||||
"header": {"host": ["example.com", "example.com", "example.com"]},
|
||||
"name": "app-server-1",
|
||||
"virtual_network_id": "a5624d4e-044a-4ff0-b3e1-e2465353d4b4",
|
||||
"weight": 0.6,
|
||||
},
|
||||
{
|
||||
"address": "0.0.0.0",
|
||||
"enabled": True,
|
||||
"header": {"host": ["example.com", "example.com", "example.com"]},
|
||||
"name": "app-server-1",
|
||||
"virtual_network_id": "a5624d4e-044a-4ff0-b3e1-e2465353d4b4",
|
||||
"weight": 0.6,
|
||||
},
|
||||
}
|
||||
],
|
||||
description="Primary data center - Provider XYZ",
|
||||
enabled=False,
|
||||
|
|
@ -93,7 +77,7 @@ class TestPools:
|
|||
response = client.load_balancers.pools.with_raw_response.create(
|
||||
account_id="023e105f4ecef8ad9ca31a8372d0c353",
|
||||
name="primary-dc-1",
|
||||
origins=[{}, {}, {}],
|
||||
origins=[{}],
|
||||
)
|
||||
|
||||
assert response.is_closed is True
|
||||
|
|
@ -106,7 +90,7 @@ class TestPools:
|
|||
with client.load_balancers.pools.with_streaming_response.create(
|
||||
account_id="023e105f4ecef8ad9ca31a8372d0c353",
|
||||
name="primary-dc-1",
|
||||
origins=[{}, {}, {}],
|
||||
origins=[{}],
|
||||
) as response:
|
||||
assert not response.is_closed
|
||||
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
|
||||
|
|
@ -122,7 +106,7 @@ class TestPools:
|
|||
client.load_balancers.pools.with_raw_response.create(
|
||||
account_id="",
|
||||
name="primary-dc-1",
|
||||
origins=[{}, {}, {}],
|
||||
origins=[{}],
|
||||
)
|
||||
|
||||
@parametrize
|
||||
|
|
@ -131,7 +115,7 @@ class TestPools:
|
|||
pool_id="17b5962d775c646f3f9725cbc7a53df4",
|
||||
account_id="023e105f4ecef8ad9ca31a8372d0c353",
|
||||
name="primary-dc-1",
|
||||
origins=[{}, {}, {}],
|
||||
origins=[{}],
|
||||
)
|
||||
assert_matches_type(Pool, pool, path=["response"])
|
||||
|
||||
|
|
@ -145,27 +129,11 @@ class TestPools:
|
|||
{
|
||||
"address": "0.0.0.0",
|
||||
"enabled": True,
|
||||
"header": {"host": ["example.com", "example.com", "example.com"]},
|
||||
"header": {"host": ["example.com"]},
|
||||
"name": "app-server-1",
|
||||
"virtual_network_id": "a5624d4e-044a-4ff0-b3e1-e2465353d4b4",
|
||||
"weight": 0.6,
|
||||
},
|
||||
{
|
||||
"address": "0.0.0.0",
|
||||
"enabled": True,
|
||||
"header": {"host": ["example.com", "example.com", "example.com"]},
|
||||
"name": "app-server-1",
|
||||
"virtual_network_id": "a5624d4e-044a-4ff0-b3e1-e2465353d4b4",
|
||||
"weight": 0.6,
|
||||
},
|
||||
{
|
||||
"address": "0.0.0.0",
|
||||
"enabled": True,
|
||||
"header": {"host": ["example.com", "example.com", "example.com"]},
|
||||
"name": "app-server-1",
|
||||
"virtual_network_id": "a5624d4e-044a-4ff0-b3e1-e2465353d4b4",
|
||||
"weight": 0.6,
|
||||
},
|
||||
}
|
||||
],
|
||||
check_regions=["WNAM", "ENAM"],
|
||||
description="Primary data center - Provider XYZ",
|
||||
|
|
@ -201,7 +169,7 @@ class TestPools:
|
|||
pool_id="17b5962d775c646f3f9725cbc7a53df4",
|
||||
account_id="023e105f4ecef8ad9ca31a8372d0c353",
|
||||
name="primary-dc-1",
|
||||
origins=[{}, {}, {}],
|
||||
origins=[{}],
|
||||
)
|
||||
|
||||
assert response.is_closed is True
|
||||
|
|
@ -215,7 +183,7 @@ class TestPools:
|
|||
pool_id="17b5962d775c646f3f9725cbc7a53df4",
|
||||
account_id="023e105f4ecef8ad9ca31a8372d0c353",
|
||||
name="primary-dc-1",
|
||||
origins=[{}, {}, {}],
|
||||
origins=[{}],
|
||||
) as response:
|
||||
assert not response.is_closed
|
||||
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
|
||||
|
|
@ -232,7 +200,7 @@ class TestPools:
|
|||
pool_id="17b5962d775c646f3f9725cbc7a53df4",
|
||||
account_id="",
|
||||
name="primary-dc-1",
|
||||
origins=[{}, {}, {}],
|
||||
origins=[{}],
|
||||
)
|
||||
|
||||
with pytest.raises(ValueError, match=r"Expected a non-empty value for `pool_id` but received ''"):
|
||||
|
|
@ -240,7 +208,7 @@ class TestPools:
|
|||
pool_id="",
|
||||
account_id="023e105f4ecef8ad9ca31a8372d0c353",
|
||||
name="primary-dc-1",
|
||||
origins=[{}, {}, {}],
|
||||
origins=[{}],
|
||||
)
|
||||
|
||||
@parametrize
|
||||
|
|
@ -380,27 +348,11 @@ class TestPools:
|
|||
{
|
||||
"address": "0.0.0.0",
|
||||
"enabled": True,
|
||||
"header": {"host": ["example.com", "example.com", "example.com"]},
|
||||
"header": {"host": ["example.com"]},
|
||||
"name": "app-server-1",
|
||||
"virtual_network_id": "a5624d4e-044a-4ff0-b3e1-e2465353d4b4",
|
||||
"weight": 0.6,
|
||||
},
|
||||
{
|
||||
"address": "0.0.0.0",
|
||||
"enabled": True,
|
||||
"header": {"host": ["example.com", "example.com", "example.com"]},
|
||||
"name": "app-server-1",
|
||||
"virtual_network_id": "a5624d4e-044a-4ff0-b3e1-e2465353d4b4",
|
||||
"weight": 0.6,
|
||||
},
|
||||
{
|
||||
"address": "0.0.0.0",
|
||||
"enabled": True,
|
||||
"header": {"host": ["example.com", "example.com", "example.com"]},
|
||||
"name": "app-server-1",
|
||||
"virtual_network_id": "a5624d4e-044a-4ff0-b3e1-e2465353d4b4",
|
||||
"weight": 0.6,
|
||||
},
|
||||
}
|
||||
],
|
||||
)
|
||||
assert_matches_type(Pool, pool, path=["response"])
|
||||
|
|
@ -502,7 +454,7 @@ class TestAsyncPools:
|
|||
pool = await async_client.load_balancers.pools.create(
|
||||
account_id="023e105f4ecef8ad9ca31a8372d0c353",
|
||||
name="primary-dc-1",
|
||||
origins=[{}, {}, {}],
|
||||
origins=[{}],
|
||||
)
|
||||
assert_matches_type(Pool, pool, path=["response"])
|
||||
|
||||
|
|
@ -515,27 +467,11 @@ class TestAsyncPools:
|
|||
{
|
||||
"address": "0.0.0.0",
|
||||
"enabled": True,
|
||||
"header": {"host": ["example.com", "example.com", "example.com"]},
|
||||
"header": {"host": ["example.com"]},
|
||||
"name": "app-server-1",
|
||||
"virtual_network_id": "a5624d4e-044a-4ff0-b3e1-e2465353d4b4",
|
||||
"weight": 0.6,
|
||||
},
|
||||
{
|
||||
"address": "0.0.0.0",
|
||||
"enabled": True,
|
||||
"header": {"host": ["example.com", "example.com", "example.com"]},
|
||||
"name": "app-server-1",
|
||||
"virtual_network_id": "a5624d4e-044a-4ff0-b3e1-e2465353d4b4",
|
||||
"weight": 0.6,
|
||||
},
|
||||
{
|
||||
"address": "0.0.0.0",
|
||||
"enabled": True,
|
||||
"header": {"host": ["example.com", "example.com", "example.com"]},
|
||||
"name": "app-server-1",
|
||||
"virtual_network_id": "a5624d4e-044a-4ff0-b3e1-e2465353d4b4",
|
||||
"weight": 0.6,
|
||||
},
|
||||
}
|
||||
],
|
||||
description="Primary data center - Provider XYZ",
|
||||
enabled=False,
|
||||
|
|
@ -569,7 +505,7 @@ class TestAsyncPools:
|
|||
response = await async_client.load_balancers.pools.with_raw_response.create(
|
||||
account_id="023e105f4ecef8ad9ca31a8372d0c353",
|
||||
name="primary-dc-1",
|
||||
origins=[{}, {}, {}],
|
||||
origins=[{}],
|
||||
)
|
||||
|
||||
assert response.is_closed is True
|
||||
|
|
@ -582,7 +518,7 @@ class TestAsyncPools:
|
|||
async with async_client.load_balancers.pools.with_streaming_response.create(
|
||||
account_id="023e105f4ecef8ad9ca31a8372d0c353",
|
||||
name="primary-dc-1",
|
||||
origins=[{}, {}, {}],
|
||||
origins=[{}],
|
||||
) as response:
|
||||
assert not response.is_closed
|
||||
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
|
||||
|
|
@ -598,7 +534,7 @@ class TestAsyncPools:
|
|||
await async_client.load_balancers.pools.with_raw_response.create(
|
||||
account_id="",
|
||||
name="primary-dc-1",
|
||||
origins=[{}, {}, {}],
|
||||
origins=[{}],
|
||||
)
|
||||
|
||||
@parametrize
|
||||
|
|
@ -607,7 +543,7 @@ class TestAsyncPools:
|
|||
pool_id="17b5962d775c646f3f9725cbc7a53df4",
|
||||
account_id="023e105f4ecef8ad9ca31a8372d0c353",
|
||||
name="primary-dc-1",
|
||||
origins=[{}, {}, {}],
|
||||
origins=[{}],
|
||||
)
|
||||
assert_matches_type(Pool, pool, path=["response"])
|
||||
|
||||
|
|
@ -621,27 +557,11 @@ class TestAsyncPools:
|
|||
{
|
||||
"address": "0.0.0.0",
|
||||
"enabled": True,
|
||||
"header": {"host": ["example.com", "example.com", "example.com"]},
|
||||
"header": {"host": ["example.com"]},
|
||||
"name": "app-server-1",
|
||||
"virtual_network_id": "a5624d4e-044a-4ff0-b3e1-e2465353d4b4",
|
||||
"weight": 0.6,
|
||||
},
|
||||
{
|
||||
"address": "0.0.0.0",
|
||||
"enabled": True,
|
||||
"header": {"host": ["example.com", "example.com", "example.com"]},
|
||||
"name": "app-server-1",
|
||||
"virtual_network_id": "a5624d4e-044a-4ff0-b3e1-e2465353d4b4",
|
||||
"weight": 0.6,
|
||||
},
|
||||
{
|
||||
"address": "0.0.0.0",
|
||||
"enabled": True,
|
||||
"header": {"host": ["example.com", "example.com", "example.com"]},
|
||||
"name": "app-server-1",
|
||||
"virtual_network_id": "a5624d4e-044a-4ff0-b3e1-e2465353d4b4",
|
||||
"weight": 0.6,
|
||||
},
|
||||
}
|
||||
],
|
||||
check_regions=["WNAM", "ENAM"],
|
||||
description="Primary data center - Provider XYZ",
|
||||
|
|
@ -677,7 +597,7 @@ class TestAsyncPools:
|
|||
pool_id="17b5962d775c646f3f9725cbc7a53df4",
|
||||
account_id="023e105f4ecef8ad9ca31a8372d0c353",
|
||||
name="primary-dc-1",
|
||||
origins=[{}, {}, {}],
|
||||
origins=[{}],
|
||||
)
|
||||
|
||||
assert response.is_closed is True
|
||||
|
|
@ -691,7 +611,7 @@ class TestAsyncPools:
|
|||
pool_id="17b5962d775c646f3f9725cbc7a53df4",
|
||||
account_id="023e105f4ecef8ad9ca31a8372d0c353",
|
||||
name="primary-dc-1",
|
||||
origins=[{}, {}, {}],
|
||||
origins=[{}],
|
||||
) as response:
|
||||
assert not response.is_closed
|
||||
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
|
||||
|
|
@ -708,7 +628,7 @@ class TestAsyncPools:
|
|||
pool_id="17b5962d775c646f3f9725cbc7a53df4",
|
||||
account_id="",
|
||||
name="primary-dc-1",
|
||||
origins=[{}, {}, {}],
|
||||
origins=[{}],
|
||||
)
|
||||
|
||||
with pytest.raises(ValueError, match=r"Expected a non-empty value for `pool_id` but received ''"):
|
||||
|
|
@ -716,7 +636,7 @@ class TestAsyncPools:
|
|||
pool_id="",
|
||||
account_id="023e105f4ecef8ad9ca31a8372d0c353",
|
||||
name="primary-dc-1",
|
||||
origins=[{}, {}, {}],
|
||||
origins=[{}],
|
||||
)
|
||||
|
||||
@parametrize
|
||||
|
|
@ -856,27 +776,11 @@ class TestAsyncPools:
|
|||
{
|
||||
"address": "0.0.0.0",
|
||||
"enabled": True,
|
||||
"header": {"host": ["example.com", "example.com", "example.com"]},
|
||||
"header": {"host": ["example.com"]},
|
||||
"name": "app-server-1",
|
||||
"virtual_network_id": "a5624d4e-044a-4ff0-b3e1-e2465353d4b4",
|
||||
"weight": 0.6,
|
||||
},
|
||||
{
|
||||
"address": "0.0.0.0",
|
||||
"enabled": True,
|
||||
"header": {"host": ["example.com", "example.com", "example.com"]},
|
||||
"name": "app-server-1",
|
||||
"virtual_network_id": "a5624d4e-044a-4ff0-b3e1-e2465353d4b4",
|
||||
"weight": 0.6,
|
||||
},
|
||||
{
|
||||
"address": "0.0.0.0",
|
||||
"enabled": True,
|
||||
"header": {"host": ["example.com", "example.com", "example.com"]},
|
||||
"name": "app-server-1",
|
||||
"virtual_network_id": "a5624d4e-044a-4ff0-b3e1-e2465353d4b4",
|
||||
"weight": 0.6,
|
||||
},
|
||||
}
|
||||
],
|
||||
)
|
||||
assert_matches_type(Pool, pool, path=["response"])
|
||||
|
|
|
|||
|
|
@ -34,23 +34,13 @@ class TestConfigs:
|
|||
account_id="6f91088a406011ed95aed352566e8d4c",
|
||||
default_sampling=1,
|
||||
name="cloudflare user's account",
|
||||
router_ips=["203.0.113.1", "203.0.113.1", "203.0.113.1"],
|
||||
router_ips=["203.0.113.1"],
|
||||
warp_devices=[
|
||||
{
|
||||
"id": "5360368d-b351-4791-abe1-93550dabd351",
|
||||
"name": "My warp device",
|
||||
"router_ip": "203.0.113.1",
|
||||
},
|
||||
{
|
||||
"id": "5360368d-b351-4791-abe1-93550dabd351",
|
||||
"name": "My warp device",
|
||||
"router_ip": "203.0.113.1",
|
||||
},
|
||||
{
|
||||
"id": "5360368d-b351-4791-abe1-93550dabd351",
|
||||
"name": "My warp device",
|
||||
"router_ip": "203.0.113.1",
|
||||
},
|
||||
}
|
||||
],
|
||||
)
|
||||
assert_matches_type(Configuration, config, path=["response"])
|
||||
|
|
@ -107,23 +97,13 @@ class TestConfigs:
|
|||
account_id="6f91088a406011ed95aed352566e8d4c",
|
||||
default_sampling=1,
|
||||
name="cloudflare user's account",
|
||||
router_ips=["203.0.113.1", "203.0.113.1", "203.0.113.1"],
|
||||
router_ips=["203.0.113.1"],
|
||||
warp_devices=[
|
||||
{
|
||||
"id": "5360368d-b351-4791-abe1-93550dabd351",
|
||||
"name": "My warp device",
|
||||
"router_ip": "203.0.113.1",
|
||||
},
|
||||
{
|
||||
"id": "5360368d-b351-4791-abe1-93550dabd351",
|
||||
"name": "My warp device",
|
||||
"router_ip": "203.0.113.1",
|
||||
},
|
||||
{
|
||||
"id": "5360368d-b351-4791-abe1-93550dabd351",
|
||||
"name": "My warp device",
|
||||
"router_ip": "203.0.113.1",
|
||||
},
|
||||
}
|
||||
],
|
||||
)
|
||||
assert_matches_type(Configuration, config, path=["response"])
|
||||
|
|
@ -216,23 +196,13 @@ class TestConfigs:
|
|||
account_id="6f91088a406011ed95aed352566e8d4c",
|
||||
default_sampling=1,
|
||||
name="cloudflare user's account",
|
||||
router_ips=["203.0.113.1", "203.0.113.1", "203.0.113.1"],
|
||||
router_ips=["203.0.113.1"],
|
||||
warp_devices=[
|
||||
{
|
||||
"id": "5360368d-b351-4791-abe1-93550dabd351",
|
||||
"name": "My warp device",
|
||||
"router_ip": "203.0.113.1",
|
||||
},
|
||||
{
|
||||
"id": "5360368d-b351-4791-abe1-93550dabd351",
|
||||
"name": "My warp device",
|
||||
"router_ip": "203.0.113.1",
|
||||
},
|
||||
{
|
||||
"id": "5360368d-b351-4791-abe1-93550dabd351",
|
||||
"name": "My warp device",
|
||||
"router_ip": "203.0.113.1",
|
||||
},
|
||||
}
|
||||
],
|
||||
)
|
||||
assert_matches_type(Configuration, config, path=["response"])
|
||||
|
|
@ -325,23 +295,13 @@ class TestAsyncConfigs:
|
|||
account_id="6f91088a406011ed95aed352566e8d4c",
|
||||
default_sampling=1,
|
||||
name="cloudflare user's account",
|
||||
router_ips=["203.0.113.1", "203.0.113.1", "203.0.113.1"],
|
||||
router_ips=["203.0.113.1"],
|
||||
warp_devices=[
|
||||
{
|
||||
"id": "5360368d-b351-4791-abe1-93550dabd351",
|
||||
"name": "My warp device",
|
||||
"router_ip": "203.0.113.1",
|
||||
},
|
||||
{
|
||||
"id": "5360368d-b351-4791-abe1-93550dabd351",
|
||||
"name": "My warp device",
|
||||
"router_ip": "203.0.113.1",
|
||||
},
|
||||
{
|
||||
"id": "5360368d-b351-4791-abe1-93550dabd351",
|
||||
"name": "My warp device",
|
||||
"router_ip": "203.0.113.1",
|
||||
},
|
||||
}
|
||||
],
|
||||
)
|
||||
assert_matches_type(Configuration, config, path=["response"])
|
||||
|
|
@ -398,23 +358,13 @@ class TestAsyncConfigs:
|
|||
account_id="6f91088a406011ed95aed352566e8d4c",
|
||||
default_sampling=1,
|
||||
name="cloudflare user's account",
|
||||
router_ips=["203.0.113.1", "203.0.113.1", "203.0.113.1"],
|
||||
router_ips=["203.0.113.1"],
|
||||
warp_devices=[
|
||||
{
|
||||
"id": "5360368d-b351-4791-abe1-93550dabd351",
|
||||
"name": "My warp device",
|
||||
"router_ip": "203.0.113.1",
|
||||
},
|
||||
{
|
||||
"id": "5360368d-b351-4791-abe1-93550dabd351",
|
||||
"name": "My warp device",
|
||||
"router_ip": "203.0.113.1",
|
||||
},
|
||||
{
|
||||
"id": "5360368d-b351-4791-abe1-93550dabd351",
|
||||
"name": "My warp device",
|
||||
"router_ip": "203.0.113.1",
|
||||
},
|
||||
}
|
||||
],
|
||||
)
|
||||
assert_matches_type(Configuration, config, path=["response"])
|
||||
|
|
@ -507,23 +457,13 @@ class TestAsyncConfigs:
|
|||
account_id="6f91088a406011ed95aed352566e8d4c",
|
||||
default_sampling=1,
|
||||
name="cloudflare user's account",
|
||||
router_ips=["203.0.113.1", "203.0.113.1", "203.0.113.1"],
|
||||
router_ips=["203.0.113.1"],
|
||||
warp_devices=[
|
||||
{
|
||||
"id": "5360368d-b351-4791-abe1-93550dabd351",
|
||||
"name": "My warp device",
|
||||
"router_ip": "203.0.113.1",
|
||||
},
|
||||
{
|
||||
"id": "5360368d-b351-4791-abe1-93550dabd351",
|
||||
"name": "My warp device",
|
||||
"router_ip": "203.0.113.1",
|
||||
},
|
||||
{
|
||||
"id": "5360368d-b351-4791-abe1-93550dabd351",
|
||||
"name": "My warp device",
|
||||
"router_ip": "203.0.113.1",
|
||||
},
|
||||
}
|
||||
],
|
||||
)
|
||||
assert_matches_type(Configuration, config, path=["response"])
|
||||
|
|
|
|||
|
|
@ -38,7 +38,7 @@ class TestRules:
|
|||
automatic_advertisement=True,
|
||||
bandwidth=1000,
|
||||
packet_threshold=10000,
|
||||
prefixes=["203.0.113.1/32", "203.0.113.1/32", "203.0.113.1/32"],
|
||||
prefixes=["203.0.113.1/32"],
|
||||
)
|
||||
assert_matches_type(Optional[MagicNetworkMonitoringRule], rule, path=["response"])
|
||||
|
||||
|
|
@ -98,7 +98,7 @@ class TestRules:
|
|||
automatic_advertisement=True,
|
||||
bandwidth=1000,
|
||||
packet_threshold=10000,
|
||||
prefixes=["203.0.113.1/32", "203.0.113.1/32", "203.0.113.1/32"],
|
||||
prefixes=["203.0.113.1/32"],
|
||||
)
|
||||
assert_matches_type(Optional[MagicNetworkMonitoringRule], rule, path=["response"])
|
||||
|
||||
|
|
@ -243,7 +243,7 @@ class TestRules:
|
|||
duration="300s",
|
||||
name="my_rule_1",
|
||||
packet_threshold=10000,
|
||||
prefixes=["203.0.113.1/32", "203.0.113.1/32", "203.0.113.1/32"],
|
||||
prefixes=["203.0.113.1/32"],
|
||||
)
|
||||
assert_matches_type(Optional[MagicNetworkMonitoringRule], rule, path=["response"])
|
||||
|
||||
|
|
@ -357,7 +357,7 @@ class TestAsyncRules:
|
|||
automatic_advertisement=True,
|
||||
bandwidth=1000,
|
||||
packet_threshold=10000,
|
||||
prefixes=["203.0.113.1/32", "203.0.113.1/32", "203.0.113.1/32"],
|
||||
prefixes=["203.0.113.1/32"],
|
||||
)
|
||||
assert_matches_type(Optional[MagicNetworkMonitoringRule], rule, path=["response"])
|
||||
|
||||
|
|
@ -417,7 +417,7 @@ class TestAsyncRules:
|
|||
automatic_advertisement=True,
|
||||
bandwidth=1000,
|
||||
packet_threshold=10000,
|
||||
prefixes=["203.0.113.1/32", "203.0.113.1/32", "203.0.113.1/32"],
|
||||
prefixes=["203.0.113.1/32"],
|
||||
)
|
||||
assert_matches_type(Optional[MagicNetworkMonitoringRule], rule, path=["response"])
|
||||
|
||||
|
|
@ -562,7 +562,7 @@ class TestAsyncRules:
|
|||
duration="300s",
|
||||
name="my_rule_1",
|
||||
packet_threshold=10000,
|
||||
prefixes=["203.0.113.1/32", "203.0.113.1/32", "203.0.113.1/32"],
|
||||
prefixes=["203.0.113.1/32"],
|
||||
)
|
||||
assert_matches_type(Optional[MagicNetworkMonitoringRule], rule, path=["response"])
|
||||
|
||||
|
|
|
|||
|
|
@ -39,19 +39,19 @@ class TestACLs:
|
|||
lan_1={
|
||||
"lan_id": "lan_id",
|
||||
"lan_name": "lan_name",
|
||||
"ports": [1, 1, 1],
|
||||
"subnets": ["192.0.2.1", "192.0.2.1", "192.0.2.1"],
|
||||
"ports": [1],
|
||||
"subnets": ["192.0.2.1"],
|
||||
},
|
||||
lan_2={
|
||||
"lan_id": "lan_id",
|
||||
"lan_name": "lan_name",
|
||||
"ports": [1, 1, 1],
|
||||
"subnets": ["192.0.2.1", "192.0.2.1", "192.0.2.1"],
|
||||
"ports": [1],
|
||||
"subnets": ["192.0.2.1"],
|
||||
},
|
||||
name="PIN Pad - Cash Register",
|
||||
description="Allows local traffic between PIN pads and cash register.",
|
||||
forward_locally=True,
|
||||
protocols=["tcp", "udp", "icmp"],
|
||||
protocols=["tcp"],
|
||||
)
|
||||
assert_matches_type(ACL, acl, path=["response"])
|
||||
|
||||
|
|
@ -127,17 +127,17 @@ class TestACLs:
|
|||
lan_1={
|
||||
"lan_id": "lan_id",
|
||||
"lan_name": "lan_name",
|
||||
"ports": [1, 1, 1],
|
||||
"subnets": ["192.0.2.1", "192.0.2.1", "192.0.2.1"],
|
||||
"ports": [1],
|
||||
"subnets": ["192.0.2.1"],
|
||||
},
|
||||
lan_2={
|
||||
"lan_id": "lan_id",
|
||||
"lan_name": "lan_name",
|
||||
"ports": [1, 1, 1],
|
||||
"subnets": ["192.0.2.1", "192.0.2.1", "192.0.2.1"],
|
||||
"ports": [1],
|
||||
"subnets": ["192.0.2.1"],
|
||||
},
|
||||
name="PIN Pad - Cash Register",
|
||||
protocols=["tcp", "udp", "icmp"],
|
||||
protocols=["tcp"],
|
||||
)
|
||||
assert_matches_type(ACL, acl, path=["response"])
|
||||
|
||||
|
|
@ -320,17 +320,17 @@ class TestACLs:
|
|||
lan_1={
|
||||
"lan_id": "lan_id",
|
||||
"lan_name": "lan_name",
|
||||
"ports": [1, 1, 1],
|
||||
"subnets": ["192.0.2.1", "192.0.2.1", "192.0.2.1"],
|
||||
"ports": [1],
|
||||
"subnets": ["192.0.2.1"],
|
||||
},
|
||||
lan_2={
|
||||
"lan_id": "lan_id",
|
||||
"lan_name": "lan_name",
|
||||
"ports": [1, 1, 1],
|
||||
"subnets": ["192.0.2.1", "192.0.2.1", "192.0.2.1"],
|
||||
"ports": [1],
|
||||
"subnets": ["192.0.2.1"],
|
||||
},
|
||||
name="PIN Pad - Cash Register",
|
||||
protocols=["tcp", "udp", "icmp"],
|
||||
protocols=["tcp"],
|
||||
)
|
||||
assert_matches_type(ACL, acl, path=["response"])
|
||||
|
||||
|
|
@ -468,19 +468,19 @@ class TestAsyncACLs:
|
|||
lan_1={
|
||||
"lan_id": "lan_id",
|
||||
"lan_name": "lan_name",
|
||||
"ports": [1, 1, 1],
|
||||
"subnets": ["192.0.2.1", "192.0.2.1", "192.0.2.1"],
|
||||
"ports": [1],
|
||||
"subnets": ["192.0.2.1"],
|
||||
},
|
||||
lan_2={
|
||||
"lan_id": "lan_id",
|
||||
"lan_name": "lan_name",
|
||||
"ports": [1, 1, 1],
|
||||
"subnets": ["192.0.2.1", "192.0.2.1", "192.0.2.1"],
|
||||
"ports": [1],
|
||||
"subnets": ["192.0.2.1"],
|
||||
},
|
||||
name="PIN Pad - Cash Register",
|
||||
description="Allows local traffic between PIN pads and cash register.",
|
||||
forward_locally=True,
|
||||
protocols=["tcp", "udp", "icmp"],
|
||||
protocols=["tcp"],
|
||||
)
|
||||
assert_matches_type(ACL, acl, path=["response"])
|
||||
|
||||
|
|
@ -556,17 +556,17 @@ class TestAsyncACLs:
|
|||
lan_1={
|
||||
"lan_id": "lan_id",
|
||||
"lan_name": "lan_name",
|
||||
"ports": [1, 1, 1],
|
||||
"subnets": ["192.0.2.1", "192.0.2.1", "192.0.2.1"],
|
||||
"ports": [1],
|
||||
"subnets": ["192.0.2.1"],
|
||||
},
|
||||
lan_2={
|
||||
"lan_id": "lan_id",
|
||||
"lan_name": "lan_name",
|
||||
"ports": [1, 1, 1],
|
||||
"subnets": ["192.0.2.1", "192.0.2.1", "192.0.2.1"],
|
||||
"ports": [1],
|
||||
"subnets": ["192.0.2.1"],
|
||||
},
|
||||
name="PIN Pad - Cash Register",
|
||||
protocols=["tcp", "udp", "icmp"],
|
||||
protocols=["tcp"],
|
||||
)
|
||||
assert_matches_type(ACL, acl, path=["response"])
|
||||
|
||||
|
|
@ -749,17 +749,17 @@ class TestAsyncACLs:
|
|||
lan_1={
|
||||
"lan_id": "lan_id",
|
||||
"lan_name": "lan_name",
|
||||
"ports": [1, 1, 1],
|
||||
"subnets": ["192.0.2.1", "192.0.2.1", "192.0.2.1"],
|
||||
"ports": [1],
|
||||
"subnets": ["192.0.2.1"],
|
||||
},
|
||||
lan_2={
|
||||
"lan_id": "lan_id",
|
||||
"lan_name": "lan_name",
|
||||
"ports": [1, 1, 1],
|
||||
"subnets": ["192.0.2.1", "192.0.2.1", "192.0.2.1"],
|
||||
"ports": [1],
|
||||
"subnets": ["192.0.2.1"],
|
||||
},
|
||||
name="PIN Pad - Cash Register",
|
||||
protocols=["tcp", "udp", "icmp"],
|
||||
protocols=["tcp"],
|
||||
)
|
||||
assert_matches_type(ACL, acl, path=["response"])
|
||||
|
||||
|
|
|
|||
|
|
@ -46,21 +46,11 @@ class TestLANs:
|
|||
"next_hop": "192.0.2.1",
|
||||
"prefix": "192.0.2.0/24",
|
||||
"nat": {"static_prefix": "192.0.2.0/24"},
|
||||
},
|
||||
{
|
||||
"next_hop": "192.0.2.1",
|
||||
"prefix": "192.0.2.0/24",
|
||||
"nat": {"static_prefix": "192.0.2.0/24"},
|
||||
},
|
||||
{
|
||||
"next_hop": "192.0.2.1",
|
||||
"prefix": "192.0.2.0/24",
|
||||
"nat": {"static_prefix": "192.0.2.0/24"},
|
||||
},
|
||||
}
|
||||
],
|
||||
static_addressing={
|
||||
"address": "192.0.2.0/24",
|
||||
"dhcp_relay": {"server_addresses": ["192.0.2.1", "192.0.2.1", "192.0.2.1"]},
|
||||
"dhcp_relay": {"server_addresses": ["192.0.2.1"]},
|
||||
"dhcp_server": {
|
||||
"dhcp_pool_end": "192.0.2.1",
|
||||
"dhcp_pool_start": "192.0.2.1",
|
||||
|
|
@ -147,21 +137,11 @@ class TestLANs:
|
|||
"next_hop": "192.0.2.1",
|
||||
"prefix": "192.0.2.0/24",
|
||||
"nat": {"static_prefix": "192.0.2.0/24"},
|
||||
},
|
||||
{
|
||||
"next_hop": "192.0.2.1",
|
||||
"prefix": "192.0.2.0/24",
|
||||
"nat": {"static_prefix": "192.0.2.0/24"},
|
||||
},
|
||||
{
|
||||
"next_hop": "192.0.2.1",
|
||||
"prefix": "192.0.2.0/24",
|
||||
"nat": {"static_prefix": "192.0.2.0/24"},
|
||||
},
|
||||
}
|
||||
],
|
||||
static_addressing={
|
||||
"address": "192.0.2.0/24",
|
||||
"dhcp_relay": {"server_addresses": ["192.0.2.1", "192.0.2.1", "192.0.2.1"]},
|
||||
"dhcp_relay": {"server_addresses": ["192.0.2.1"]},
|
||||
"dhcp_server": {
|
||||
"dhcp_pool_end": "192.0.2.1",
|
||||
"dhcp_pool_start": "192.0.2.1",
|
||||
|
|
@ -360,21 +340,11 @@ class TestLANs:
|
|||
"next_hop": "192.0.2.1",
|
||||
"prefix": "192.0.2.0/24",
|
||||
"nat": {"static_prefix": "192.0.2.0/24"},
|
||||
},
|
||||
{
|
||||
"next_hop": "192.0.2.1",
|
||||
"prefix": "192.0.2.0/24",
|
||||
"nat": {"static_prefix": "192.0.2.0/24"},
|
||||
},
|
||||
{
|
||||
"next_hop": "192.0.2.1",
|
||||
"prefix": "192.0.2.0/24",
|
||||
"nat": {"static_prefix": "192.0.2.0/24"},
|
||||
},
|
||||
}
|
||||
],
|
||||
static_addressing={
|
||||
"address": "192.0.2.0/24",
|
||||
"dhcp_relay": {"server_addresses": ["192.0.2.1", "192.0.2.1", "192.0.2.1"]},
|
||||
"dhcp_relay": {"server_addresses": ["192.0.2.1"]},
|
||||
"dhcp_server": {
|
||||
"dhcp_pool_end": "192.0.2.1",
|
||||
"dhcp_pool_start": "192.0.2.1",
|
||||
|
|
@ -531,21 +501,11 @@ class TestAsyncLANs:
|
|||
"next_hop": "192.0.2.1",
|
||||
"prefix": "192.0.2.0/24",
|
||||
"nat": {"static_prefix": "192.0.2.0/24"},
|
||||
},
|
||||
{
|
||||
"next_hop": "192.0.2.1",
|
||||
"prefix": "192.0.2.0/24",
|
||||
"nat": {"static_prefix": "192.0.2.0/24"},
|
||||
},
|
||||
{
|
||||
"next_hop": "192.0.2.1",
|
||||
"prefix": "192.0.2.0/24",
|
||||
"nat": {"static_prefix": "192.0.2.0/24"},
|
||||
},
|
||||
}
|
||||
],
|
||||
static_addressing={
|
||||
"address": "192.0.2.0/24",
|
||||
"dhcp_relay": {"server_addresses": ["192.0.2.1", "192.0.2.1", "192.0.2.1"]},
|
||||
"dhcp_relay": {"server_addresses": ["192.0.2.1"]},
|
||||
"dhcp_server": {
|
||||
"dhcp_pool_end": "192.0.2.1",
|
||||
"dhcp_pool_start": "192.0.2.1",
|
||||
|
|
@ -632,21 +592,11 @@ class TestAsyncLANs:
|
|||
"next_hop": "192.0.2.1",
|
||||
"prefix": "192.0.2.0/24",
|
||||
"nat": {"static_prefix": "192.0.2.0/24"},
|
||||
},
|
||||
{
|
||||
"next_hop": "192.0.2.1",
|
||||
"prefix": "192.0.2.0/24",
|
||||
"nat": {"static_prefix": "192.0.2.0/24"},
|
||||
},
|
||||
{
|
||||
"next_hop": "192.0.2.1",
|
||||
"prefix": "192.0.2.0/24",
|
||||
"nat": {"static_prefix": "192.0.2.0/24"},
|
||||
},
|
||||
}
|
||||
],
|
||||
static_addressing={
|
||||
"address": "192.0.2.0/24",
|
||||
"dhcp_relay": {"server_addresses": ["192.0.2.1", "192.0.2.1", "192.0.2.1"]},
|
||||
"dhcp_relay": {"server_addresses": ["192.0.2.1"]},
|
||||
"dhcp_server": {
|
||||
"dhcp_pool_end": "192.0.2.1",
|
||||
"dhcp_pool_start": "192.0.2.1",
|
||||
|
|
@ -845,21 +795,11 @@ class TestAsyncLANs:
|
|||
"next_hop": "192.0.2.1",
|
||||
"prefix": "192.0.2.0/24",
|
||||
"nat": {"static_prefix": "192.0.2.0/24"},
|
||||
},
|
||||
{
|
||||
"next_hop": "192.0.2.1",
|
||||
"prefix": "192.0.2.0/24",
|
||||
"nat": {"static_prefix": "192.0.2.0/24"},
|
||||
},
|
||||
{
|
||||
"next_hop": "192.0.2.1",
|
||||
"prefix": "192.0.2.0/24",
|
||||
"nat": {"static_prefix": "192.0.2.0/24"},
|
||||
},
|
||||
}
|
||||
],
|
||||
static_addressing={
|
||||
"address": "192.0.2.0/24",
|
||||
"dhcp_relay": {"server_addresses": ["192.0.2.1", "192.0.2.1", "192.0.2.1"]},
|
||||
"dhcp_relay": {"server_addresses": ["192.0.2.1"]},
|
||||
"dhcp_server": {
|
||||
"dhcp_pool_end": "192.0.2.1",
|
||||
"dhcp_pool_start": "192.0.2.1",
|
||||
|
|
|
|||
|
|
@ -91,8 +91,8 @@ class TestRoutes:
|
|||
priority=0,
|
||||
description="New route for new prefix 203.0.113.1",
|
||||
scope={
|
||||
"colo_names": ["den01", "den01", "den01"],
|
||||
"colo_regions": ["APAC", "APAC", "APAC"],
|
||||
"colo_names": ["den01"],
|
||||
"colo_regions": ["APAC"],
|
||||
},
|
||||
weight=0,
|
||||
)
|
||||
|
|
@ -393,8 +393,8 @@ class TestAsyncRoutes:
|
|||
priority=0,
|
||||
description="New route for new prefix 203.0.113.1",
|
||||
scope={
|
||||
"colo_names": ["den01", "den01", "den01"],
|
||||
"colo_regions": ["APAC", "APAC", "APAC"],
|
||||
"colo_names": ["den01"],
|
||||
"colo_regions": ["APAC"],
|
||||
},
|
||||
weight=0,
|
||||
)
|
||||
|
|
|
|||
|
|
@ -24,7 +24,7 @@ class TestHostnames:
|
|||
def test_method_update(self, client: Cloudflare) -> None:
|
||||
hostname = client.origin_tls_client_auth.hostnames.update(
|
||||
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
|
||||
config=[{}, {}, {}],
|
||||
config=[{}],
|
||||
)
|
||||
assert_matches_type(Optional[HostnameUpdateResponse], hostname, path=["response"])
|
||||
|
||||
|
|
@ -32,7 +32,7 @@ class TestHostnames:
|
|||
def test_raw_response_update(self, client: Cloudflare) -> None:
|
||||
response = client.origin_tls_client_auth.hostnames.with_raw_response.update(
|
||||
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
|
||||
config=[{}, {}, {}],
|
||||
config=[{}],
|
||||
)
|
||||
|
||||
assert response.is_closed is True
|
||||
|
|
@ -44,7 +44,7 @@ class TestHostnames:
|
|||
def test_streaming_response_update(self, client: Cloudflare) -> None:
|
||||
with client.origin_tls_client_auth.hostnames.with_streaming_response.update(
|
||||
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
|
||||
config=[{}, {}, {}],
|
||||
config=[{}],
|
||||
) as response:
|
||||
assert not response.is_closed
|
||||
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
|
||||
|
|
@ -59,7 +59,7 @@ class TestHostnames:
|
|||
with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"):
|
||||
client.origin_tls_client_auth.hostnames.with_raw_response.update(
|
||||
zone_id="",
|
||||
config=[{}, {}, {}],
|
||||
config=[{}],
|
||||
)
|
||||
|
||||
@parametrize
|
||||
|
|
@ -118,7 +118,7 @@ class TestAsyncHostnames:
|
|||
async def test_method_update(self, async_client: AsyncCloudflare) -> None:
|
||||
hostname = await async_client.origin_tls_client_auth.hostnames.update(
|
||||
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
|
||||
config=[{}, {}, {}],
|
||||
config=[{}],
|
||||
)
|
||||
assert_matches_type(Optional[HostnameUpdateResponse], hostname, path=["response"])
|
||||
|
||||
|
|
@ -126,7 +126,7 @@ class TestAsyncHostnames:
|
|||
async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None:
|
||||
response = await async_client.origin_tls_client_auth.hostnames.with_raw_response.update(
|
||||
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
|
||||
config=[{}, {}, {}],
|
||||
config=[{}],
|
||||
)
|
||||
|
||||
assert response.is_closed is True
|
||||
|
|
@ -138,7 +138,7 @@ class TestAsyncHostnames:
|
|||
async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> None:
|
||||
async with async_client.origin_tls_client_auth.hostnames.with_streaming_response.update(
|
||||
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
|
||||
config=[{}, {}, {}],
|
||||
config=[{}],
|
||||
) as response:
|
||||
assert not response.is_closed
|
||||
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
|
||||
|
|
@ -153,7 +153,7 @@ class TestAsyncHostnames:
|
|||
with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"):
|
||||
await async_client.origin_tls_client_auth.hostnames.with_raw_response.update(
|
||||
zone_id="",
|
||||
config=[{}, {}, {}],
|
||||
config=[{}],
|
||||
)
|
||||
|
||||
@parametrize
|
||||
|
|
|
|||
|
|
@ -33,27 +33,13 @@ class TestMessages:
|
|||
acks=[
|
||||
{
|
||||
"lease_id": "eyJhbGciOiJkaXIiLCJlbmMiOiJBMjU2Q0JDLUhTNTEyIn0..Q8p21d7dceR6vUfwftONdQ.JVqZgAS-Zk7MqmqccYtTHeeMElNHaOMigeWdb8LyMOg.T2_HV99CYzGaQuhTyW8RsgbnpTRZHRM6N7UoSaAKeK0"
|
||||
},
|
||||
{
|
||||
"lease_id": "eyJhbGciOiJkaXIiLCJlbmMiOiJBMjU2Q0JDLUhTNTEyIn0..Q8p21d7dceR6vUfwftONdQ.JVqZgAS-Zk7MqmqccYtTHeeMElNHaOMigeWdb8LyMOg.T2_HV99CYzGaQuhTyW8RsgbnpTRZHRM6N7UoSaAKeK0"
|
||||
},
|
||||
{
|
||||
"lease_id": "eyJhbGciOiJkaXIiLCJlbmMiOiJBMjU2Q0JDLUhTNTEyIn0..Q8p21d7dceR6vUfwftONdQ.JVqZgAS-Zk7MqmqccYtTHeeMElNHaOMigeWdb8LyMOg.T2_HV99CYzGaQuhTyW8RsgbnpTRZHRM6N7UoSaAKeK0"
|
||||
},
|
||||
}
|
||||
],
|
||||
retries=[
|
||||
{
|
||||
"delay_seconds": 10,
|
||||
"lease_id": "eyJhbGciOiJkaXIiLCJlbmMiOiJBMjU2Q0JDLUhTNTEyIn0..Q8p21d7dceR6vUfwftONdQ.JVqZgAS-Zk7MqmqccYtTHeeMElNHaOMigeWdb8LyMOg.T2_HV99CYzGaQuhTyW8RsgbnpTRZHRM6N7UoSaAKeK0",
|
||||
},
|
||||
{
|
||||
"delay_seconds": 10,
|
||||
"lease_id": "eyJhbGciOiJkaXIiLCJlbmMiOiJBMjU2Q0JDLUhTNTEyIn0..Q8p21d7dceR6vUfwftONdQ.JVqZgAS-Zk7MqmqccYtTHeeMElNHaOMigeWdb8LyMOg.T2_HV99CYzGaQuhTyW8RsgbnpTRZHRM6N7UoSaAKeK0",
|
||||
},
|
||||
{
|
||||
"delay_seconds": 10,
|
||||
"lease_id": "eyJhbGciOiJkaXIiLCJlbmMiOiJBMjU2Q0JDLUhTNTEyIn0..Q8p21d7dceR6vUfwftONdQ.JVqZgAS-Zk7MqmqccYtTHeeMElNHaOMigeWdb8LyMOg.T2_HV99CYzGaQuhTyW8RsgbnpTRZHRM6N7UoSaAKeK0",
|
||||
},
|
||||
}
|
||||
],
|
||||
)
|
||||
assert_matches_type(Optional[MessageAckResponse], message, path=["response"])
|
||||
|
|
@ -176,27 +162,13 @@ class TestAsyncMessages:
|
|||
acks=[
|
||||
{
|
||||
"lease_id": "eyJhbGciOiJkaXIiLCJlbmMiOiJBMjU2Q0JDLUhTNTEyIn0..Q8p21d7dceR6vUfwftONdQ.JVqZgAS-Zk7MqmqccYtTHeeMElNHaOMigeWdb8LyMOg.T2_HV99CYzGaQuhTyW8RsgbnpTRZHRM6N7UoSaAKeK0"
|
||||
},
|
||||
{
|
||||
"lease_id": "eyJhbGciOiJkaXIiLCJlbmMiOiJBMjU2Q0JDLUhTNTEyIn0..Q8p21d7dceR6vUfwftONdQ.JVqZgAS-Zk7MqmqccYtTHeeMElNHaOMigeWdb8LyMOg.T2_HV99CYzGaQuhTyW8RsgbnpTRZHRM6N7UoSaAKeK0"
|
||||
},
|
||||
{
|
||||
"lease_id": "eyJhbGciOiJkaXIiLCJlbmMiOiJBMjU2Q0JDLUhTNTEyIn0..Q8p21d7dceR6vUfwftONdQ.JVqZgAS-Zk7MqmqccYtTHeeMElNHaOMigeWdb8LyMOg.T2_HV99CYzGaQuhTyW8RsgbnpTRZHRM6N7UoSaAKeK0"
|
||||
},
|
||||
}
|
||||
],
|
||||
retries=[
|
||||
{
|
||||
"delay_seconds": 10,
|
||||
"lease_id": "eyJhbGciOiJkaXIiLCJlbmMiOiJBMjU2Q0JDLUhTNTEyIn0..Q8p21d7dceR6vUfwftONdQ.JVqZgAS-Zk7MqmqccYtTHeeMElNHaOMigeWdb8LyMOg.T2_HV99CYzGaQuhTyW8RsgbnpTRZHRM6N7UoSaAKeK0",
|
||||
},
|
||||
{
|
||||
"delay_seconds": 10,
|
||||
"lease_id": "eyJhbGciOiJkaXIiLCJlbmMiOiJBMjU2Q0JDLUhTNTEyIn0..Q8p21d7dceR6vUfwftONdQ.JVqZgAS-Zk7MqmqccYtTHeeMElNHaOMigeWdb8LyMOg.T2_HV99CYzGaQuhTyW8RsgbnpTRZHRM6N7UoSaAKeK0",
|
||||
},
|
||||
{
|
||||
"delay_seconds": 10,
|
||||
"lease_id": "eyJhbGciOiJkaXIiLCJlbmMiOiJBMjU2Q0JDLUhTNTEyIn0..Q8p21d7dceR6vUfwftONdQ.JVqZgAS-Zk7MqmqccYtTHeeMElNHaOMigeWdb8LyMOg.T2_HV99CYzGaQuhTyW8RsgbnpTRZHRM6N7UoSaAKeK0",
|
||||
},
|
||||
}
|
||||
],
|
||||
)
|
||||
assert_matches_type(Optional[MessageAckResponse], message, path=["response"])
|
||||
|
|
|
|||
|
|
@ -37,19 +37,7 @@ class TestQueues:
|
|||
"description": "Notifications from source bucket to queue",
|
||||
"prefix": "img/",
|
||||
"suffix": ".jpeg",
|
||||
},
|
||||
{
|
||||
"actions": ["PutObject", "CopyObject"],
|
||||
"description": "Notifications from source bucket to queue",
|
||||
"prefix": "img/",
|
||||
"suffix": ".jpeg",
|
||||
},
|
||||
{
|
||||
"actions": ["PutObject", "CopyObject"],
|
||||
"description": "Notifications from source bucket to queue",
|
||||
"prefix": "img/",
|
||||
"suffix": ".jpeg",
|
||||
},
|
||||
}
|
||||
],
|
||||
cf_r2_jurisdiction="default",
|
||||
)
|
||||
|
|
@ -201,19 +189,7 @@ class TestAsyncQueues:
|
|||
"description": "Notifications from source bucket to queue",
|
||||
"prefix": "img/",
|
||||
"suffix": ".jpeg",
|
||||
},
|
||||
{
|
||||
"actions": ["PutObject", "CopyObject"],
|
||||
"description": "Notifications from source bucket to queue",
|
||||
"prefix": "img/",
|
||||
"suffix": ".jpeg",
|
||||
},
|
||||
{
|
||||
"actions": ["PutObject", "CopyObject"],
|
||||
"description": "Notifications from source bucket to queue",
|
||||
"prefix": "img/",
|
||||
"suffix": ".jpeg",
|
||||
},
|
||||
}
|
||||
],
|
||||
cf_r2_jurisdiction="default",
|
||||
)
|
||||
|
|
|
|||
|
|
@ -54,103 +54,9 @@ class TestLifecycle:
|
|||
"type": "Age",
|
||||
},
|
||||
"storage_class": "InfrequentAccess",
|
||||
},
|
||||
{
|
||||
"condition": {
|
||||
"max_age": 0,
|
||||
"type": "Age",
|
||||
},
|
||||
"storage_class": "InfrequentAccess",
|
||||
},
|
||||
{
|
||||
"condition": {
|
||||
"max_age": 0,
|
||||
"type": "Age",
|
||||
},
|
||||
"storage_class": "InfrequentAccess",
|
||||
},
|
||||
}
|
||||
],
|
||||
},
|
||||
{
|
||||
"id": "Expire all objects older than 24 hours",
|
||||
"conditions": {"prefix": "prefix"},
|
||||
"enabled": True,
|
||||
"abort_multipart_uploads_transition": {
|
||||
"condition": {
|
||||
"max_age": 0,
|
||||
"type": "Age",
|
||||
}
|
||||
},
|
||||
"delete_objects_transition": {
|
||||
"condition": {
|
||||
"max_age": 0,
|
||||
"type": "Age",
|
||||
}
|
||||
},
|
||||
"storage_class_transitions": [
|
||||
{
|
||||
"condition": {
|
||||
"max_age": 0,
|
||||
"type": "Age",
|
||||
},
|
||||
"storage_class": "InfrequentAccess",
|
||||
},
|
||||
{
|
||||
"condition": {
|
||||
"max_age": 0,
|
||||
"type": "Age",
|
||||
},
|
||||
"storage_class": "InfrequentAccess",
|
||||
},
|
||||
{
|
||||
"condition": {
|
||||
"max_age": 0,
|
||||
"type": "Age",
|
||||
},
|
||||
"storage_class": "InfrequentAccess",
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
"id": "Expire all objects older than 24 hours",
|
||||
"conditions": {"prefix": "prefix"},
|
||||
"enabled": True,
|
||||
"abort_multipart_uploads_transition": {
|
||||
"condition": {
|
||||
"max_age": 0,
|
||||
"type": "Age",
|
||||
}
|
||||
},
|
||||
"delete_objects_transition": {
|
||||
"condition": {
|
||||
"max_age": 0,
|
||||
"type": "Age",
|
||||
}
|
||||
},
|
||||
"storage_class_transitions": [
|
||||
{
|
||||
"condition": {
|
||||
"max_age": 0,
|
||||
"type": "Age",
|
||||
},
|
||||
"storage_class": "InfrequentAccess",
|
||||
},
|
||||
{
|
||||
"condition": {
|
||||
"max_age": 0,
|
||||
"type": "Age",
|
||||
},
|
||||
"storage_class": "InfrequentAccess",
|
||||
},
|
||||
{
|
||||
"condition": {
|
||||
"max_age": 0,
|
||||
"type": "Age",
|
||||
},
|
||||
"storage_class": "InfrequentAccess",
|
||||
},
|
||||
],
|
||||
},
|
||||
}
|
||||
],
|
||||
cf_r2_jurisdiction="default",
|
||||
)
|
||||
|
|
@ -294,103 +200,9 @@ class TestAsyncLifecycle:
|
|||
"type": "Age",
|
||||
},
|
||||
"storage_class": "InfrequentAccess",
|
||||
},
|
||||
{
|
||||
"condition": {
|
||||
"max_age": 0,
|
||||
"type": "Age",
|
||||
},
|
||||
"storage_class": "InfrequentAccess",
|
||||
},
|
||||
{
|
||||
"condition": {
|
||||
"max_age": 0,
|
||||
"type": "Age",
|
||||
},
|
||||
"storage_class": "InfrequentAccess",
|
||||
},
|
||||
}
|
||||
],
|
||||
},
|
||||
{
|
||||
"id": "Expire all objects older than 24 hours",
|
||||
"conditions": {"prefix": "prefix"},
|
||||
"enabled": True,
|
||||
"abort_multipart_uploads_transition": {
|
||||
"condition": {
|
||||
"max_age": 0,
|
||||
"type": "Age",
|
||||
}
|
||||
},
|
||||
"delete_objects_transition": {
|
||||
"condition": {
|
||||
"max_age": 0,
|
||||
"type": "Age",
|
||||
}
|
||||
},
|
||||
"storage_class_transitions": [
|
||||
{
|
||||
"condition": {
|
||||
"max_age": 0,
|
||||
"type": "Age",
|
||||
},
|
||||
"storage_class": "InfrequentAccess",
|
||||
},
|
||||
{
|
||||
"condition": {
|
||||
"max_age": 0,
|
||||
"type": "Age",
|
||||
},
|
||||
"storage_class": "InfrequentAccess",
|
||||
},
|
||||
{
|
||||
"condition": {
|
||||
"max_age": 0,
|
||||
"type": "Age",
|
||||
},
|
||||
"storage_class": "InfrequentAccess",
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
"id": "Expire all objects older than 24 hours",
|
||||
"conditions": {"prefix": "prefix"},
|
||||
"enabled": True,
|
||||
"abort_multipart_uploads_transition": {
|
||||
"condition": {
|
||||
"max_age": 0,
|
||||
"type": "Age",
|
||||
}
|
||||
},
|
||||
"delete_objects_transition": {
|
||||
"condition": {
|
||||
"max_age": 0,
|
||||
"type": "Age",
|
||||
}
|
||||
},
|
||||
"storage_class_transitions": [
|
||||
{
|
||||
"condition": {
|
||||
"max_age": 0,
|
||||
"type": "Age",
|
||||
},
|
||||
"storage_class": "InfrequentAccess",
|
||||
},
|
||||
{
|
||||
"condition": {
|
||||
"max_age": 0,
|
||||
"type": "Age",
|
||||
},
|
||||
"storage_class": "InfrequentAccess",
|
||||
},
|
||||
{
|
||||
"condition": {
|
||||
"max_age": 0,
|
||||
"type": "Age",
|
||||
},
|
||||
"storage_class": "InfrequentAccess",
|
||||
},
|
||||
],
|
||||
},
|
||||
}
|
||||
],
|
||||
cf_r2_jurisdiction="default",
|
||||
)
|
||||
|
|
|
|||
|
|
@ -26,22 +26,14 @@ class TestSummary:
|
|||
@parametrize
|
||||
def test_method_user_agent_with_all_params(self, client: Cloudflare) -> None:
|
||||
summary = client.radar.ai.bots.summary.user_agent(
|
||||
asn=["string", "string", "string"],
|
||||
continent=["string", "string", "string"],
|
||||
date_end=[
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
],
|
||||
date_range=["7d", "7d", "7d"],
|
||||
date_start=[
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
],
|
||||
asn=["string"],
|
||||
continent=["string"],
|
||||
date_end=[parse_datetime("2019-12-27T18:11:19.117Z")],
|
||||
date_range=["7d"],
|
||||
date_start=[parse_datetime("2019-12-27T18:11:19.117Z")],
|
||||
format="JSON",
|
||||
location=["string", "string", "string"],
|
||||
name=["string", "string", "string"],
|
||||
location=["string"],
|
||||
name=["string"],
|
||||
)
|
||||
assert_matches_type(SummaryUserAgentResponse, summary, path=["response"])
|
||||
|
||||
|
|
@ -77,22 +69,14 @@ class TestAsyncSummary:
|
|||
@parametrize
|
||||
async def test_method_user_agent_with_all_params(self, async_client: AsyncCloudflare) -> None:
|
||||
summary = await async_client.radar.ai.bots.summary.user_agent(
|
||||
asn=["string", "string", "string"],
|
||||
continent=["string", "string", "string"],
|
||||
date_end=[
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
],
|
||||
date_range=["7d", "7d", "7d"],
|
||||
date_start=[
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
],
|
||||
asn=["string"],
|
||||
continent=["string"],
|
||||
date_end=[parse_datetime("2019-12-27T18:11:19.117Z")],
|
||||
date_range=["7d"],
|
||||
date_start=[parse_datetime("2019-12-27T18:11:19.117Z")],
|
||||
format="JSON",
|
||||
location=["string", "string", "string"],
|
||||
name=["string", "string", "string"],
|
||||
location=["string"],
|
||||
name=["string"],
|
||||
)
|
||||
assert_matches_type(SummaryUserAgentResponse, summary, path=["response"])
|
||||
|
||||
|
|
|
|||
|
|
@ -27,23 +27,15 @@ class TestTimeseriesGroups:
|
|||
def test_method_user_agent_with_all_params(self, client: Cloudflare) -> None:
|
||||
timeseries_group = client.radar.ai.timeseries_groups.user_agent(
|
||||
agg_interval="15m",
|
||||
asn=["string", "string", "string"],
|
||||
continent=["string", "string", "string"],
|
||||
date_end=[
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
],
|
||||
date_range=["7d", "7d", "7d"],
|
||||
date_start=[
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
],
|
||||
asn=["string"],
|
||||
continent=["string"],
|
||||
date_end=[parse_datetime("2019-12-27T18:11:19.117Z")],
|
||||
date_range=["7d"],
|
||||
date_start=[parse_datetime("2019-12-27T18:11:19.117Z")],
|
||||
format="JSON",
|
||||
limit_per_group=4,
|
||||
location=["string", "string", "string"],
|
||||
name=["string", "string", "string"],
|
||||
location=["string"],
|
||||
name=["string"],
|
||||
)
|
||||
assert_matches_type(TimeseriesGroupUserAgentResponse, timeseries_group, path=["response"])
|
||||
|
||||
|
|
@ -80,23 +72,15 @@ class TestAsyncTimeseriesGroups:
|
|||
async def test_method_user_agent_with_all_params(self, async_client: AsyncCloudflare) -> None:
|
||||
timeseries_group = await async_client.radar.ai.timeseries_groups.user_agent(
|
||||
agg_interval="15m",
|
||||
asn=["string", "string", "string"],
|
||||
continent=["string", "string", "string"],
|
||||
date_end=[
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
],
|
||||
date_range=["7d", "7d", "7d"],
|
||||
date_start=[
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
],
|
||||
asn=["string"],
|
||||
continent=["string"],
|
||||
date_end=[parse_datetime("2019-12-27T18:11:19.117Z")],
|
||||
date_range=["7d"],
|
||||
date_start=[parse_datetime("2019-12-27T18:11:19.117Z")],
|
||||
format="JSON",
|
||||
limit_per_group=4,
|
||||
location=["string", "string", "string"],
|
||||
name=["string", "string", "string"],
|
||||
location=["string"],
|
||||
name=["string"],
|
||||
)
|
||||
assert_matches_type(TimeseriesGroupUserAgentResponse, timeseries_group, path=["response"])
|
||||
|
||||
|
|
|
|||
|
|
@ -33,22 +33,14 @@ class TestSummary:
|
|||
@parametrize
|
||||
def test_method_dnssec_with_all_params(self, client: Cloudflare) -> None:
|
||||
summary = client.radar.as112.summary.dnssec(
|
||||
asn=["string", "string", "string"],
|
||||
continent=["string", "string", "string"],
|
||||
date_end=[
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
],
|
||||
date_range=["7d", "7d", "7d"],
|
||||
date_start=[
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
],
|
||||
asn=["string"],
|
||||
continent=["string"],
|
||||
date_end=[parse_datetime("2019-12-27T18:11:19.117Z")],
|
||||
date_range=["7d"],
|
||||
date_start=[parse_datetime("2019-12-27T18:11:19.117Z")],
|
||||
format="JSON",
|
||||
location=["string", "string", "string"],
|
||||
name=["string", "string", "string"],
|
||||
location=["string"],
|
||||
name=["string"],
|
||||
)
|
||||
assert_matches_type(SummaryDNSSECResponse, summary, path=["response"])
|
||||
|
||||
|
|
@ -80,22 +72,14 @@ class TestSummary:
|
|||
@parametrize
|
||||
def test_method_edns_with_all_params(self, client: Cloudflare) -> None:
|
||||
summary = client.radar.as112.summary.edns(
|
||||
asn=["string", "string", "string"],
|
||||
continent=["string", "string", "string"],
|
||||
date_end=[
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
],
|
||||
date_range=["7d", "7d", "7d"],
|
||||
date_start=[
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
],
|
||||
asn=["string"],
|
||||
continent=["string"],
|
||||
date_end=[parse_datetime("2019-12-27T18:11:19.117Z")],
|
||||
date_range=["7d"],
|
||||
date_start=[parse_datetime("2019-12-27T18:11:19.117Z")],
|
||||
format="JSON",
|
||||
location=["string", "string", "string"],
|
||||
name=["string", "string", "string"],
|
||||
location=["string"],
|
||||
name=["string"],
|
||||
)
|
||||
assert_matches_type(SummaryEdnsResponse, summary, path=["response"])
|
||||
|
||||
|
|
@ -127,22 +111,14 @@ class TestSummary:
|
|||
@parametrize
|
||||
def test_method_ip_version_with_all_params(self, client: Cloudflare) -> None:
|
||||
summary = client.radar.as112.summary.ip_version(
|
||||
asn=["string", "string", "string"],
|
||||
continent=["string", "string", "string"],
|
||||
date_end=[
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
],
|
||||
date_range=["7d", "7d", "7d"],
|
||||
date_start=[
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
],
|
||||
asn=["string"],
|
||||
continent=["string"],
|
||||
date_end=[parse_datetime("2019-12-27T18:11:19.117Z")],
|
||||
date_range=["7d"],
|
||||
date_start=[parse_datetime("2019-12-27T18:11:19.117Z")],
|
||||
format="JSON",
|
||||
location=["string", "string", "string"],
|
||||
name=["string", "string", "string"],
|
||||
location=["string"],
|
||||
name=["string"],
|
||||
)
|
||||
assert_matches_type(SummaryIPVersionResponse, summary, path=["response"])
|
||||
|
||||
|
|
@ -174,22 +150,14 @@ class TestSummary:
|
|||
@parametrize
|
||||
def test_method_protocol_with_all_params(self, client: Cloudflare) -> None:
|
||||
summary = client.radar.as112.summary.protocol(
|
||||
asn=["string", "string", "string"],
|
||||
continent=["string", "string", "string"],
|
||||
date_end=[
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
],
|
||||
date_range=["7d", "7d", "7d"],
|
||||
date_start=[
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
],
|
||||
asn=["string"],
|
||||
continent=["string"],
|
||||
date_end=[parse_datetime("2019-12-27T18:11:19.117Z")],
|
||||
date_range=["7d"],
|
||||
date_start=[parse_datetime("2019-12-27T18:11:19.117Z")],
|
||||
format="JSON",
|
||||
location=["string", "string", "string"],
|
||||
name=["string", "string", "string"],
|
||||
location=["string"],
|
||||
name=["string"],
|
||||
)
|
||||
assert_matches_type(SummaryProtocolResponse, summary, path=["response"])
|
||||
|
||||
|
|
@ -221,22 +189,14 @@ class TestSummary:
|
|||
@parametrize
|
||||
def test_method_query_type_with_all_params(self, client: Cloudflare) -> None:
|
||||
summary = client.radar.as112.summary.query_type(
|
||||
asn=["string", "string", "string"],
|
||||
continent=["string", "string", "string"],
|
||||
date_end=[
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
],
|
||||
date_range=["7d", "7d", "7d"],
|
||||
date_start=[
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
],
|
||||
asn=["string"],
|
||||
continent=["string"],
|
||||
date_end=[parse_datetime("2019-12-27T18:11:19.117Z")],
|
||||
date_range=["7d"],
|
||||
date_start=[parse_datetime("2019-12-27T18:11:19.117Z")],
|
||||
format="JSON",
|
||||
location=["string", "string", "string"],
|
||||
name=["string", "string", "string"],
|
||||
location=["string"],
|
||||
name=["string"],
|
||||
)
|
||||
assert_matches_type(SummaryQueryTypeResponse, summary, path=["response"])
|
||||
|
||||
|
|
@ -268,22 +228,14 @@ class TestSummary:
|
|||
@parametrize
|
||||
def test_method_response_codes_with_all_params(self, client: Cloudflare) -> None:
|
||||
summary = client.radar.as112.summary.response_codes(
|
||||
asn=["string", "string", "string"],
|
||||
continent=["string", "string", "string"],
|
||||
date_end=[
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
],
|
||||
date_range=["7d", "7d", "7d"],
|
||||
date_start=[
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
],
|
||||
asn=["string"],
|
||||
continent=["string"],
|
||||
date_end=[parse_datetime("2019-12-27T18:11:19.117Z")],
|
||||
date_range=["7d"],
|
||||
date_start=[parse_datetime("2019-12-27T18:11:19.117Z")],
|
||||
format="JSON",
|
||||
location=["string", "string", "string"],
|
||||
name=["string", "string", "string"],
|
||||
location=["string"],
|
||||
name=["string"],
|
||||
)
|
||||
assert_matches_type(SummaryResponseCodesResponse, summary, path=["response"])
|
||||
|
||||
|
|
@ -319,22 +271,14 @@ class TestAsyncSummary:
|
|||
@parametrize
|
||||
async def test_method_dnssec_with_all_params(self, async_client: AsyncCloudflare) -> None:
|
||||
summary = await async_client.radar.as112.summary.dnssec(
|
||||
asn=["string", "string", "string"],
|
||||
continent=["string", "string", "string"],
|
||||
date_end=[
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
],
|
||||
date_range=["7d", "7d", "7d"],
|
||||
date_start=[
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
],
|
||||
asn=["string"],
|
||||
continent=["string"],
|
||||
date_end=[parse_datetime("2019-12-27T18:11:19.117Z")],
|
||||
date_range=["7d"],
|
||||
date_start=[parse_datetime("2019-12-27T18:11:19.117Z")],
|
||||
format="JSON",
|
||||
location=["string", "string", "string"],
|
||||
name=["string", "string", "string"],
|
||||
location=["string"],
|
||||
name=["string"],
|
||||
)
|
||||
assert_matches_type(SummaryDNSSECResponse, summary, path=["response"])
|
||||
|
||||
|
|
@ -366,22 +310,14 @@ class TestAsyncSummary:
|
|||
@parametrize
|
||||
async def test_method_edns_with_all_params(self, async_client: AsyncCloudflare) -> None:
|
||||
summary = await async_client.radar.as112.summary.edns(
|
||||
asn=["string", "string", "string"],
|
||||
continent=["string", "string", "string"],
|
||||
date_end=[
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
],
|
||||
date_range=["7d", "7d", "7d"],
|
||||
date_start=[
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
],
|
||||
asn=["string"],
|
||||
continent=["string"],
|
||||
date_end=[parse_datetime("2019-12-27T18:11:19.117Z")],
|
||||
date_range=["7d"],
|
||||
date_start=[parse_datetime("2019-12-27T18:11:19.117Z")],
|
||||
format="JSON",
|
||||
location=["string", "string", "string"],
|
||||
name=["string", "string", "string"],
|
||||
location=["string"],
|
||||
name=["string"],
|
||||
)
|
||||
assert_matches_type(SummaryEdnsResponse, summary, path=["response"])
|
||||
|
||||
|
|
@ -413,22 +349,14 @@ class TestAsyncSummary:
|
|||
@parametrize
|
||||
async def test_method_ip_version_with_all_params(self, async_client: AsyncCloudflare) -> None:
|
||||
summary = await async_client.radar.as112.summary.ip_version(
|
||||
asn=["string", "string", "string"],
|
||||
continent=["string", "string", "string"],
|
||||
date_end=[
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
],
|
||||
date_range=["7d", "7d", "7d"],
|
||||
date_start=[
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
],
|
||||
asn=["string"],
|
||||
continent=["string"],
|
||||
date_end=[parse_datetime("2019-12-27T18:11:19.117Z")],
|
||||
date_range=["7d"],
|
||||
date_start=[parse_datetime("2019-12-27T18:11:19.117Z")],
|
||||
format="JSON",
|
||||
location=["string", "string", "string"],
|
||||
name=["string", "string", "string"],
|
||||
location=["string"],
|
||||
name=["string"],
|
||||
)
|
||||
assert_matches_type(SummaryIPVersionResponse, summary, path=["response"])
|
||||
|
||||
|
|
@ -460,22 +388,14 @@ class TestAsyncSummary:
|
|||
@parametrize
|
||||
async def test_method_protocol_with_all_params(self, async_client: AsyncCloudflare) -> None:
|
||||
summary = await async_client.radar.as112.summary.protocol(
|
||||
asn=["string", "string", "string"],
|
||||
continent=["string", "string", "string"],
|
||||
date_end=[
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
],
|
||||
date_range=["7d", "7d", "7d"],
|
||||
date_start=[
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
],
|
||||
asn=["string"],
|
||||
continent=["string"],
|
||||
date_end=[parse_datetime("2019-12-27T18:11:19.117Z")],
|
||||
date_range=["7d"],
|
||||
date_start=[parse_datetime("2019-12-27T18:11:19.117Z")],
|
||||
format="JSON",
|
||||
location=["string", "string", "string"],
|
||||
name=["string", "string", "string"],
|
||||
location=["string"],
|
||||
name=["string"],
|
||||
)
|
||||
assert_matches_type(SummaryProtocolResponse, summary, path=["response"])
|
||||
|
||||
|
|
@ -507,22 +427,14 @@ class TestAsyncSummary:
|
|||
@parametrize
|
||||
async def test_method_query_type_with_all_params(self, async_client: AsyncCloudflare) -> None:
|
||||
summary = await async_client.radar.as112.summary.query_type(
|
||||
asn=["string", "string", "string"],
|
||||
continent=["string", "string", "string"],
|
||||
date_end=[
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
],
|
||||
date_range=["7d", "7d", "7d"],
|
||||
date_start=[
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
],
|
||||
asn=["string"],
|
||||
continent=["string"],
|
||||
date_end=[parse_datetime("2019-12-27T18:11:19.117Z")],
|
||||
date_range=["7d"],
|
||||
date_start=[parse_datetime("2019-12-27T18:11:19.117Z")],
|
||||
format="JSON",
|
||||
location=["string", "string", "string"],
|
||||
name=["string", "string", "string"],
|
||||
location=["string"],
|
||||
name=["string"],
|
||||
)
|
||||
assert_matches_type(SummaryQueryTypeResponse, summary, path=["response"])
|
||||
|
||||
|
|
@ -554,22 +466,14 @@ class TestAsyncSummary:
|
|||
@parametrize
|
||||
async def test_method_response_codes_with_all_params(self, async_client: AsyncCloudflare) -> None:
|
||||
summary = await async_client.radar.as112.summary.response_codes(
|
||||
asn=["string", "string", "string"],
|
||||
continent=["string", "string", "string"],
|
||||
date_end=[
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
],
|
||||
date_range=["7d", "7d", "7d"],
|
||||
date_start=[
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
],
|
||||
asn=["string"],
|
||||
continent=["string"],
|
||||
date_end=[parse_datetime("2019-12-27T18:11:19.117Z")],
|
||||
date_range=["7d"],
|
||||
date_start=[parse_datetime("2019-12-27T18:11:19.117Z")],
|
||||
format="JSON",
|
||||
location=["string", "string", "string"],
|
||||
name=["string", "string", "string"],
|
||||
location=["string"],
|
||||
name=["string"],
|
||||
)
|
||||
assert_matches_type(SummaryResponseCodesResponse, summary, path=["response"])
|
||||
|
||||
|
|
|
|||
|
|
@ -34,22 +34,14 @@ class TestTimeseriesGroups:
|
|||
def test_method_dnssec_with_all_params(self, client: Cloudflare) -> None:
|
||||
timeseries_group = client.radar.as112.timeseries_groups.dnssec(
|
||||
agg_interval="15m",
|
||||
asn=["string", "string", "string"],
|
||||
continent=["string", "string", "string"],
|
||||
date_end=[
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
],
|
||||
date_range=["7d", "7d", "7d"],
|
||||
date_start=[
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
],
|
||||
asn=["string"],
|
||||
continent=["string"],
|
||||
date_end=[parse_datetime("2019-12-27T18:11:19.117Z")],
|
||||
date_range=["7d"],
|
||||
date_start=[parse_datetime("2019-12-27T18:11:19.117Z")],
|
||||
format="JSON",
|
||||
location=["string", "string", "string"],
|
||||
name=["string", "string", "string"],
|
||||
location=["string"],
|
||||
name=["string"],
|
||||
)
|
||||
assert_matches_type(TimeseriesGroupDNSSECResponse, timeseries_group, path=["response"])
|
||||
|
||||
|
|
@ -82,22 +74,14 @@ class TestTimeseriesGroups:
|
|||
def test_method_edns_with_all_params(self, client: Cloudflare) -> None:
|
||||
timeseries_group = client.radar.as112.timeseries_groups.edns(
|
||||
agg_interval="15m",
|
||||
asn=["string", "string", "string"],
|
||||
continent=["string", "string", "string"],
|
||||
date_end=[
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
],
|
||||
date_range=["7d", "7d", "7d"],
|
||||
date_start=[
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
],
|
||||
asn=["string"],
|
||||
continent=["string"],
|
||||
date_end=[parse_datetime("2019-12-27T18:11:19.117Z")],
|
||||
date_range=["7d"],
|
||||
date_start=[parse_datetime("2019-12-27T18:11:19.117Z")],
|
||||
format="JSON",
|
||||
location=["string", "string", "string"],
|
||||
name=["string", "string", "string"],
|
||||
location=["string"],
|
||||
name=["string"],
|
||||
)
|
||||
assert_matches_type(TimeseriesGroupEdnsResponse, timeseries_group, path=["response"])
|
||||
|
||||
|
|
@ -130,22 +114,14 @@ class TestTimeseriesGroups:
|
|||
def test_method_ip_version_with_all_params(self, client: Cloudflare) -> None:
|
||||
timeseries_group = client.radar.as112.timeseries_groups.ip_version(
|
||||
agg_interval="15m",
|
||||
asn=["string", "string", "string"],
|
||||
continent=["string", "string", "string"],
|
||||
date_end=[
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
],
|
||||
date_range=["7d", "7d", "7d"],
|
||||
date_start=[
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
],
|
||||
asn=["string"],
|
||||
continent=["string"],
|
||||
date_end=[parse_datetime("2019-12-27T18:11:19.117Z")],
|
||||
date_range=["7d"],
|
||||
date_start=[parse_datetime("2019-12-27T18:11:19.117Z")],
|
||||
format="JSON",
|
||||
location=["string", "string", "string"],
|
||||
name=["string", "string", "string"],
|
||||
location=["string"],
|
||||
name=["string"],
|
||||
)
|
||||
assert_matches_type(TimeseriesGroupIPVersionResponse, timeseries_group, path=["response"])
|
||||
|
||||
|
|
@ -178,22 +154,14 @@ class TestTimeseriesGroups:
|
|||
def test_method_protocol_with_all_params(self, client: Cloudflare) -> None:
|
||||
timeseries_group = client.radar.as112.timeseries_groups.protocol(
|
||||
agg_interval="15m",
|
||||
asn=["string", "string", "string"],
|
||||
continent=["string", "string", "string"],
|
||||
date_end=[
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
],
|
||||
date_range=["7d", "7d", "7d"],
|
||||
date_start=[
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
],
|
||||
asn=["string"],
|
||||
continent=["string"],
|
||||
date_end=[parse_datetime("2019-12-27T18:11:19.117Z")],
|
||||
date_range=["7d"],
|
||||
date_start=[parse_datetime("2019-12-27T18:11:19.117Z")],
|
||||
format="JSON",
|
||||
location=["string", "string", "string"],
|
||||
name=["string", "string", "string"],
|
||||
location=["string"],
|
||||
name=["string"],
|
||||
)
|
||||
assert_matches_type(TimeseriesGroupProtocolResponse, timeseries_group, path=["response"])
|
||||
|
||||
|
|
@ -226,22 +194,14 @@ class TestTimeseriesGroups:
|
|||
def test_method_query_type_with_all_params(self, client: Cloudflare) -> None:
|
||||
timeseries_group = client.radar.as112.timeseries_groups.query_type(
|
||||
agg_interval="15m",
|
||||
asn=["string", "string", "string"],
|
||||
continent=["string", "string", "string"],
|
||||
date_end=[
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
],
|
||||
date_range=["7d", "7d", "7d"],
|
||||
date_start=[
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
],
|
||||
asn=["string"],
|
||||
continent=["string"],
|
||||
date_end=[parse_datetime("2019-12-27T18:11:19.117Z")],
|
||||
date_range=["7d"],
|
||||
date_start=[parse_datetime("2019-12-27T18:11:19.117Z")],
|
||||
format="JSON",
|
||||
location=["string", "string", "string"],
|
||||
name=["string", "string", "string"],
|
||||
location=["string"],
|
||||
name=["string"],
|
||||
)
|
||||
assert_matches_type(TimeseriesGroupQueryTypeResponse, timeseries_group, path=["response"])
|
||||
|
||||
|
|
@ -274,22 +234,14 @@ class TestTimeseriesGroups:
|
|||
def test_method_response_codes_with_all_params(self, client: Cloudflare) -> None:
|
||||
timeseries_group = client.radar.as112.timeseries_groups.response_codes(
|
||||
agg_interval="15m",
|
||||
asn=["string", "string", "string"],
|
||||
continent=["string", "string", "string"],
|
||||
date_end=[
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
],
|
||||
date_range=["7d", "7d", "7d"],
|
||||
date_start=[
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
],
|
||||
asn=["string"],
|
||||
continent=["string"],
|
||||
date_end=[parse_datetime("2019-12-27T18:11:19.117Z")],
|
||||
date_range=["7d"],
|
||||
date_start=[parse_datetime("2019-12-27T18:11:19.117Z")],
|
||||
format="JSON",
|
||||
location=["string", "string", "string"],
|
||||
name=["string", "string", "string"],
|
||||
location=["string"],
|
||||
name=["string"],
|
||||
)
|
||||
assert_matches_type(TimeseriesGroupResponseCodesResponse, timeseries_group, path=["response"])
|
||||
|
||||
|
|
@ -326,22 +278,14 @@ class TestAsyncTimeseriesGroups:
|
|||
async def test_method_dnssec_with_all_params(self, async_client: AsyncCloudflare) -> None:
|
||||
timeseries_group = await async_client.radar.as112.timeseries_groups.dnssec(
|
||||
agg_interval="15m",
|
||||
asn=["string", "string", "string"],
|
||||
continent=["string", "string", "string"],
|
||||
date_end=[
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
],
|
||||
date_range=["7d", "7d", "7d"],
|
||||
date_start=[
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
],
|
||||
asn=["string"],
|
||||
continent=["string"],
|
||||
date_end=[parse_datetime("2019-12-27T18:11:19.117Z")],
|
||||
date_range=["7d"],
|
||||
date_start=[parse_datetime("2019-12-27T18:11:19.117Z")],
|
||||
format="JSON",
|
||||
location=["string", "string", "string"],
|
||||
name=["string", "string", "string"],
|
||||
location=["string"],
|
||||
name=["string"],
|
||||
)
|
||||
assert_matches_type(TimeseriesGroupDNSSECResponse, timeseries_group, path=["response"])
|
||||
|
||||
|
|
@ -374,22 +318,14 @@ class TestAsyncTimeseriesGroups:
|
|||
async def test_method_edns_with_all_params(self, async_client: AsyncCloudflare) -> None:
|
||||
timeseries_group = await async_client.radar.as112.timeseries_groups.edns(
|
||||
agg_interval="15m",
|
||||
asn=["string", "string", "string"],
|
||||
continent=["string", "string", "string"],
|
||||
date_end=[
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
],
|
||||
date_range=["7d", "7d", "7d"],
|
||||
date_start=[
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
],
|
||||
asn=["string"],
|
||||
continent=["string"],
|
||||
date_end=[parse_datetime("2019-12-27T18:11:19.117Z")],
|
||||
date_range=["7d"],
|
||||
date_start=[parse_datetime("2019-12-27T18:11:19.117Z")],
|
||||
format="JSON",
|
||||
location=["string", "string", "string"],
|
||||
name=["string", "string", "string"],
|
||||
location=["string"],
|
||||
name=["string"],
|
||||
)
|
||||
assert_matches_type(TimeseriesGroupEdnsResponse, timeseries_group, path=["response"])
|
||||
|
||||
|
|
@ -422,22 +358,14 @@ class TestAsyncTimeseriesGroups:
|
|||
async def test_method_ip_version_with_all_params(self, async_client: AsyncCloudflare) -> None:
|
||||
timeseries_group = await async_client.radar.as112.timeseries_groups.ip_version(
|
||||
agg_interval="15m",
|
||||
asn=["string", "string", "string"],
|
||||
continent=["string", "string", "string"],
|
||||
date_end=[
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
],
|
||||
date_range=["7d", "7d", "7d"],
|
||||
date_start=[
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
],
|
||||
asn=["string"],
|
||||
continent=["string"],
|
||||
date_end=[parse_datetime("2019-12-27T18:11:19.117Z")],
|
||||
date_range=["7d"],
|
||||
date_start=[parse_datetime("2019-12-27T18:11:19.117Z")],
|
||||
format="JSON",
|
||||
location=["string", "string", "string"],
|
||||
name=["string", "string", "string"],
|
||||
location=["string"],
|
||||
name=["string"],
|
||||
)
|
||||
assert_matches_type(TimeseriesGroupIPVersionResponse, timeseries_group, path=["response"])
|
||||
|
||||
|
|
@ -470,22 +398,14 @@ class TestAsyncTimeseriesGroups:
|
|||
async def test_method_protocol_with_all_params(self, async_client: AsyncCloudflare) -> None:
|
||||
timeseries_group = await async_client.radar.as112.timeseries_groups.protocol(
|
||||
agg_interval="15m",
|
||||
asn=["string", "string", "string"],
|
||||
continent=["string", "string", "string"],
|
||||
date_end=[
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
],
|
||||
date_range=["7d", "7d", "7d"],
|
||||
date_start=[
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
],
|
||||
asn=["string"],
|
||||
continent=["string"],
|
||||
date_end=[parse_datetime("2019-12-27T18:11:19.117Z")],
|
||||
date_range=["7d"],
|
||||
date_start=[parse_datetime("2019-12-27T18:11:19.117Z")],
|
||||
format="JSON",
|
||||
location=["string", "string", "string"],
|
||||
name=["string", "string", "string"],
|
||||
location=["string"],
|
||||
name=["string"],
|
||||
)
|
||||
assert_matches_type(TimeseriesGroupProtocolResponse, timeseries_group, path=["response"])
|
||||
|
||||
|
|
@ -518,22 +438,14 @@ class TestAsyncTimeseriesGroups:
|
|||
async def test_method_query_type_with_all_params(self, async_client: AsyncCloudflare) -> None:
|
||||
timeseries_group = await async_client.radar.as112.timeseries_groups.query_type(
|
||||
agg_interval="15m",
|
||||
asn=["string", "string", "string"],
|
||||
continent=["string", "string", "string"],
|
||||
date_end=[
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
],
|
||||
date_range=["7d", "7d", "7d"],
|
||||
date_start=[
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
],
|
||||
asn=["string"],
|
||||
continent=["string"],
|
||||
date_end=[parse_datetime("2019-12-27T18:11:19.117Z")],
|
||||
date_range=["7d"],
|
||||
date_start=[parse_datetime("2019-12-27T18:11:19.117Z")],
|
||||
format="JSON",
|
||||
location=["string", "string", "string"],
|
||||
name=["string", "string", "string"],
|
||||
location=["string"],
|
||||
name=["string"],
|
||||
)
|
||||
assert_matches_type(TimeseriesGroupQueryTypeResponse, timeseries_group, path=["response"])
|
||||
|
||||
|
|
@ -566,22 +478,14 @@ class TestAsyncTimeseriesGroups:
|
|||
async def test_method_response_codes_with_all_params(self, async_client: AsyncCloudflare) -> None:
|
||||
timeseries_group = await async_client.radar.as112.timeseries_groups.response_codes(
|
||||
agg_interval="15m",
|
||||
asn=["string", "string", "string"],
|
||||
continent=["string", "string", "string"],
|
||||
date_end=[
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
],
|
||||
date_range=["7d", "7d", "7d"],
|
||||
date_start=[
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
],
|
||||
asn=["string"],
|
||||
continent=["string"],
|
||||
date_end=[parse_datetime("2019-12-27T18:11:19.117Z")],
|
||||
date_range=["7d"],
|
||||
date_start=[parse_datetime("2019-12-27T18:11:19.117Z")],
|
||||
format="JSON",
|
||||
location=["string", "string", "string"],
|
||||
name=["string", "string", "string"],
|
||||
location=["string"],
|
||||
name=["string"],
|
||||
)
|
||||
assert_matches_type(TimeseriesGroupResponseCodesResponse, timeseries_group, path=["response"])
|
||||
|
||||
|
|
|
|||
|
|
@ -34,23 +34,15 @@ class TestTop:
|
|||
def test_method_dnssec_with_all_params(self, client: Cloudflare) -> None:
|
||||
top = client.radar.as112.top.dnssec(
|
||||
dnssec="SUPPORTED",
|
||||
asn=["string", "string", "string"],
|
||||
continent=["string", "string", "string"],
|
||||
date_end=[
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
],
|
||||
date_range=["7d", "7d", "7d"],
|
||||
date_start=[
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
],
|
||||
asn=["string"],
|
||||
continent=["string"],
|
||||
date_end=[parse_datetime("2019-12-27T18:11:19.117Z")],
|
||||
date_range=["7d"],
|
||||
date_start=[parse_datetime("2019-12-27T18:11:19.117Z")],
|
||||
format="JSON",
|
||||
limit=5,
|
||||
location=["string", "string", "string"],
|
||||
name=["string", "string", "string"],
|
||||
location=["string"],
|
||||
name=["string"],
|
||||
)
|
||||
assert_matches_type(TopDNSSECResponse, top, path=["response"])
|
||||
|
||||
|
|
@ -89,23 +81,15 @@ class TestTop:
|
|||
def test_method_edns_with_all_params(self, client: Cloudflare) -> None:
|
||||
top = client.radar.as112.top.edns(
|
||||
edns="SUPPORTED",
|
||||
asn=["string", "string", "string"],
|
||||
continent=["string", "string", "string"],
|
||||
date_end=[
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
],
|
||||
date_range=["7d", "7d", "7d"],
|
||||
date_start=[
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
],
|
||||
asn=["string"],
|
||||
continent=["string"],
|
||||
date_end=[parse_datetime("2019-12-27T18:11:19.117Z")],
|
||||
date_range=["7d"],
|
||||
date_start=[parse_datetime("2019-12-27T18:11:19.117Z")],
|
||||
format="JSON",
|
||||
limit=5,
|
||||
location=["string", "string", "string"],
|
||||
name=["string", "string", "string"],
|
||||
location=["string"],
|
||||
name=["string"],
|
||||
)
|
||||
assert_matches_type(TopEdnsResponse, top, path=["response"])
|
||||
|
||||
|
|
@ -144,23 +128,15 @@ class TestTop:
|
|||
def test_method_ip_version_with_all_params(self, client: Cloudflare) -> None:
|
||||
top = client.radar.as112.top.ip_version(
|
||||
ip_version="IPv4",
|
||||
asn=["string", "string", "string"],
|
||||
continent=["string", "string", "string"],
|
||||
date_end=[
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
],
|
||||
date_range=["7d", "7d", "7d"],
|
||||
date_start=[
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
],
|
||||
asn=["string"],
|
||||
continent=["string"],
|
||||
date_end=[parse_datetime("2019-12-27T18:11:19.117Z")],
|
||||
date_range=["7d"],
|
||||
date_start=[parse_datetime("2019-12-27T18:11:19.117Z")],
|
||||
format="JSON",
|
||||
limit=5,
|
||||
location=["string", "string", "string"],
|
||||
name=["string", "string", "string"],
|
||||
location=["string"],
|
||||
name=["string"],
|
||||
)
|
||||
assert_matches_type(TopIPVersionResponse, top, path=["response"])
|
||||
|
||||
|
|
@ -196,23 +172,15 @@ class TestTop:
|
|||
@parametrize
|
||||
def test_method_locations_with_all_params(self, client: Cloudflare) -> None:
|
||||
top = client.radar.as112.top.locations(
|
||||
asn=["string", "string", "string"],
|
||||
continent=["string", "string", "string"],
|
||||
date_end=[
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
],
|
||||
date_range=["7d", "7d", "7d"],
|
||||
date_start=[
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
],
|
||||
asn=["string"],
|
||||
continent=["string"],
|
||||
date_end=[parse_datetime("2019-12-27T18:11:19.117Z")],
|
||||
date_range=["7d"],
|
||||
date_start=[parse_datetime("2019-12-27T18:11:19.117Z")],
|
||||
format="JSON",
|
||||
limit=5,
|
||||
location=["string", "string", "string"],
|
||||
name=["string", "string", "string"],
|
||||
location=["string"],
|
||||
name=["string"],
|
||||
)
|
||||
assert_matches_type(TopLocationsResponse, top, path=["response"])
|
||||
|
||||
|
|
@ -251,23 +219,15 @@ class TestAsyncTop:
|
|||
async def test_method_dnssec_with_all_params(self, async_client: AsyncCloudflare) -> None:
|
||||
top = await async_client.radar.as112.top.dnssec(
|
||||
dnssec="SUPPORTED",
|
||||
asn=["string", "string", "string"],
|
||||
continent=["string", "string", "string"],
|
||||
date_end=[
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
],
|
||||
date_range=["7d", "7d", "7d"],
|
||||
date_start=[
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
],
|
||||
asn=["string"],
|
||||
continent=["string"],
|
||||
date_end=[parse_datetime("2019-12-27T18:11:19.117Z")],
|
||||
date_range=["7d"],
|
||||
date_start=[parse_datetime("2019-12-27T18:11:19.117Z")],
|
||||
format="JSON",
|
||||
limit=5,
|
||||
location=["string", "string", "string"],
|
||||
name=["string", "string", "string"],
|
||||
location=["string"],
|
||||
name=["string"],
|
||||
)
|
||||
assert_matches_type(TopDNSSECResponse, top, path=["response"])
|
||||
|
||||
|
|
@ -306,23 +266,15 @@ class TestAsyncTop:
|
|||
async def test_method_edns_with_all_params(self, async_client: AsyncCloudflare) -> None:
|
||||
top = await async_client.radar.as112.top.edns(
|
||||
edns="SUPPORTED",
|
||||
asn=["string", "string", "string"],
|
||||
continent=["string", "string", "string"],
|
||||
date_end=[
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
],
|
||||
date_range=["7d", "7d", "7d"],
|
||||
date_start=[
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
],
|
||||
asn=["string"],
|
||||
continent=["string"],
|
||||
date_end=[parse_datetime("2019-12-27T18:11:19.117Z")],
|
||||
date_range=["7d"],
|
||||
date_start=[parse_datetime("2019-12-27T18:11:19.117Z")],
|
||||
format="JSON",
|
||||
limit=5,
|
||||
location=["string", "string", "string"],
|
||||
name=["string", "string", "string"],
|
||||
location=["string"],
|
||||
name=["string"],
|
||||
)
|
||||
assert_matches_type(TopEdnsResponse, top, path=["response"])
|
||||
|
||||
|
|
@ -361,23 +313,15 @@ class TestAsyncTop:
|
|||
async def test_method_ip_version_with_all_params(self, async_client: AsyncCloudflare) -> None:
|
||||
top = await async_client.radar.as112.top.ip_version(
|
||||
ip_version="IPv4",
|
||||
asn=["string", "string", "string"],
|
||||
continent=["string", "string", "string"],
|
||||
date_end=[
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
],
|
||||
date_range=["7d", "7d", "7d"],
|
||||
date_start=[
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
],
|
||||
asn=["string"],
|
||||
continent=["string"],
|
||||
date_end=[parse_datetime("2019-12-27T18:11:19.117Z")],
|
||||
date_range=["7d"],
|
||||
date_start=[parse_datetime("2019-12-27T18:11:19.117Z")],
|
||||
format="JSON",
|
||||
limit=5,
|
||||
location=["string", "string", "string"],
|
||||
name=["string", "string", "string"],
|
||||
location=["string"],
|
||||
name=["string"],
|
||||
)
|
||||
assert_matches_type(TopIPVersionResponse, top, path=["response"])
|
||||
|
||||
|
|
@ -413,23 +357,15 @@ class TestAsyncTop:
|
|||
@parametrize
|
||||
async def test_method_locations_with_all_params(self, async_client: AsyncCloudflare) -> None:
|
||||
top = await async_client.radar.as112.top.locations(
|
||||
asn=["string", "string", "string"],
|
||||
continent=["string", "string", "string"],
|
||||
date_end=[
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
],
|
||||
date_range=["7d", "7d", "7d"],
|
||||
date_start=[
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
],
|
||||
asn=["string"],
|
||||
continent=["string"],
|
||||
date_end=[parse_datetime("2019-12-27T18:11:19.117Z")],
|
||||
date_range=["7d"],
|
||||
date_start=[parse_datetime("2019-12-27T18:11:19.117Z")],
|
||||
format="JSON",
|
||||
limit=5,
|
||||
location=["string", "string", "string"],
|
||||
name=["string", "string", "string"],
|
||||
location=["string"],
|
||||
name=["string"],
|
||||
)
|
||||
assert_matches_type(TopLocationsResponse, top, path=["response"])
|
||||
|
||||
|
|
|
|||
|
|
@ -33,24 +33,16 @@ class TestSummary:
|
|||
@parametrize
|
||||
def test_method_bitrate_with_all_params(self, client: Cloudflare) -> None:
|
||||
summary = client.radar.attacks.layer3.summary.bitrate(
|
||||
continent=["string", "string", "string"],
|
||||
date_end=[
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
],
|
||||
date_range=["7d", "7d", "7d"],
|
||||
date_start=[
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
],
|
||||
continent=["string"],
|
||||
date_end=[parse_datetime("2019-12-27T18:11:19.117Z")],
|
||||
date_range=["7d"],
|
||||
date_start=[parse_datetime("2019-12-27T18:11:19.117Z")],
|
||||
direction="ORIGIN",
|
||||
format="JSON",
|
||||
ip_version=["IPv4", "IPv6"],
|
||||
location=["string", "string", "string"],
|
||||
name=["string", "string", "string"],
|
||||
protocol=["UDP", "TCP", "ICMP"],
|
||||
ip_version=["IPv4"],
|
||||
location=["string"],
|
||||
name=["string"],
|
||||
protocol=["UDP"],
|
||||
)
|
||||
assert_matches_type(SummaryBitrateResponse, summary, path=["response"])
|
||||
|
||||
|
|
@ -82,24 +74,16 @@ class TestSummary:
|
|||
@parametrize
|
||||
def test_method_duration_with_all_params(self, client: Cloudflare) -> None:
|
||||
summary = client.radar.attacks.layer3.summary.duration(
|
||||
continent=["string", "string", "string"],
|
||||
date_end=[
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
],
|
||||
date_range=["7d", "7d", "7d"],
|
||||
date_start=[
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
],
|
||||
continent=["string"],
|
||||
date_end=[parse_datetime("2019-12-27T18:11:19.117Z")],
|
||||
date_range=["7d"],
|
||||
date_start=[parse_datetime("2019-12-27T18:11:19.117Z")],
|
||||
direction="ORIGIN",
|
||||
format="JSON",
|
||||
ip_version=["IPv4", "IPv6"],
|
||||
location=["string", "string", "string"],
|
||||
name=["string", "string", "string"],
|
||||
protocol=["UDP", "TCP", "ICMP"],
|
||||
ip_version=["IPv4"],
|
||||
location=["string"],
|
||||
name=["string"],
|
||||
protocol=["UDP"],
|
||||
)
|
||||
assert_matches_type(SummaryDurationResponse, summary, path=["response"])
|
||||
|
||||
|
|
@ -131,22 +115,14 @@ class TestSummary:
|
|||
@parametrize
|
||||
def test_method_get_with_all_params(self, client: Cloudflare) -> None:
|
||||
summary = client.radar.attacks.layer3.summary.get(
|
||||
asn=["string", "string", "string"],
|
||||
continent=["string", "string", "string"],
|
||||
date_end=[
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
],
|
||||
date_range=["7d", "7d", "7d"],
|
||||
date_start=[
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
],
|
||||
asn=["string"],
|
||||
continent=["string"],
|
||||
date_end=[parse_datetime("2019-12-27T18:11:19.117Z")],
|
||||
date_range=["7d"],
|
||||
date_start=[parse_datetime("2019-12-27T18:11:19.117Z")],
|
||||
format="JSON",
|
||||
location=["string", "string", "string"],
|
||||
name=["string", "string", "string"],
|
||||
location=["string"],
|
||||
name=["string"],
|
||||
)
|
||||
assert_matches_type(SummaryGetResponse, summary, path=["response"])
|
||||
|
||||
|
|
@ -178,23 +154,15 @@ class TestSummary:
|
|||
@parametrize
|
||||
def test_method_ip_version_with_all_params(self, client: Cloudflare) -> None:
|
||||
summary = client.radar.attacks.layer3.summary.ip_version(
|
||||
continent=["string", "string", "string"],
|
||||
date_end=[
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
],
|
||||
date_range=["7d", "7d", "7d"],
|
||||
date_start=[
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
],
|
||||
continent=["string"],
|
||||
date_end=[parse_datetime("2019-12-27T18:11:19.117Z")],
|
||||
date_range=["7d"],
|
||||
date_start=[parse_datetime("2019-12-27T18:11:19.117Z")],
|
||||
direction="ORIGIN",
|
||||
format="JSON",
|
||||
location=["string", "string", "string"],
|
||||
name=["string", "string", "string"],
|
||||
protocol=["UDP", "TCP", "ICMP"],
|
||||
location=["string"],
|
||||
name=["string"],
|
||||
protocol=["UDP"],
|
||||
)
|
||||
assert_matches_type(SummaryIPVersionResponse, summary, path=["response"])
|
||||
|
||||
|
|
@ -226,23 +194,15 @@ class TestSummary:
|
|||
@parametrize
|
||||
def test_method_protocol_with_all_params(self, client: Cloudflare) -> None:
|
||||
summary = client.radar.attacks.layer3.summary.protocol(
|
||||
continent=["string", "string", "string"],
|
||||
date_end=[
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
],
|
||||
date_range=["7d", "7d", "7d"],
|
||||
date_start=[
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
],
|
||||
continent=["string"],
|
||||
date_end=[parse_datetime("2019-12-27T18:11:19.117Z")],
|
||||
date_range=["7d"],
|
||||
date_start=[parse_datetime("2019-12-27T18:11:19.117Z")],
|
||||
direction="ORIGIN",
|
||||
format="JSON",
|
||||
ip_version=["IPv4", "IPv6"],
|
||||
location=["string", "string", "string"],
|
||||
name=["string", "string", "string"],
|
||||
ip_version=["IPv4"],
|
||||
location=["string"],
|
||||
name=["string"],
|
||||
)
|
||||
assert_matches_type(SummaryProtocolResponse, summary, path=["response"])
|
||||
|
||||
|
|
@ -274,24 +234,16 @@ class TestSummary:
|
|||
@parametrize
|
||||
def test_method_vector_with_all_params(self, client: Cloudflare) -> None:
|
||||
summary = client.radar.attacks.layer3.summary.vector(
|
||||
continent=["string", "string", "string"],
|
||||
date_end=[
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
],
|
||||
date_range=["7d", "7d", "7d"],
|
||||
date_start=[
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
],
|
||||
continent=["string"],
|
||||
date_end=[parse_datetime("2019-12-27T18:11:19.117Z")],
|
||||
date_range=["7d"],
|
||||
date_start=[parse_datetime("2019-12-27T18:11:19.117Z")],
|
||||
direction="ORIGIN",
|
||||
format="JSON",
|
||||
ip_version=["IPv4", "IPv6"],
|
||||
location=["string", "string", "string"],
|
||||
name=["string", "string", "string"],
|
||||
protocol=["UDP", "TCP", "ICMP"],
|
||||
ip_version=["IPv4"],
|
||||
location=["string"],
|
||||
name=["string"],
|
||||
protocol=["UDP"],
|
||||
)
|
||||
assert_matches_type(SummaryVectorResponse, summary, path=["response"])
|
||||
|
||||
|
|
@ -327,24 +279,16 @@ class TestAsyncSummary:
|
|||
@parametrize
|
||||
async def test_method_bitrate_with_all_params(self, async_client: AsyncCloudflare) -> None:
|
||||
summary = await async_client.radar.attacks.layer3.summary.bitrate(
|
||||
continent=["string", "string", "string"],
|
||||
date_end=[
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
],
|
||||
date_range=["7d", "7d", "7d"],
|
||||
date_start=[
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
],
|
||||
continent=["string"],
|
||||
date_end=[parse_datetime("2019-12-27T18:11:19.117Z")],
|
||||
date_range=["7d"],
|
||||
date_start=[parse_datetime("2019-12-27T18:11:19.117Z")],
|
||||
direction="ORIGIN",
|
||||
format="JSON",
|
||||
ip_version=["IPv4", "IPv6"],
|
||||
location=["string", "string", "string"],
|
||||
name=["string", "string", "string"],
|
||||
protocol=["UDP", "TCP", "ICMP"],
|
||||
ip_version=["IPv4"],
|
||||
location=["string"],
|
||||
name=["string"],
|
||||
protocol=["UDP"],
|
||||
)
|
||||
assert_matches_type(SummaryBitrateResponse, summary, path=["response"])
|
||||
|
||||
|
|
@ -376,24 +320,16 @@ class TestAsyncSummary:
|
|||
@parametrize
|
||||
async def test_method_duration_with_all_params(self, async_client: AsyncCloudflare) -> None:
|
||||
summary = await async_client.radar.attacks.layer3.summary.duration(
|
||||
continent=["string", "string", "string"],
|
||||
date_end=[
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
],
|
||||
date_range=["7d", "7d", "7d"],
|
||||
date_start=[
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
],
|
||||
continent=["string"],
|
||||
date_end=[parse_datetime("2019-12-27T18:11:19.117Z")],
|
||||
date_range=["7d"],
|
||||
date_start=[parse_datetime("2019-12-27T18:11:19.117Z")],
|
||||
direction="ORIGIN",
|
||||
format="JSON",
|
||||
ip_version=["IPv4", "IPv6"],
|
||||
location=["string", "string", "string"],
|
||||
name=["string", "string", "string"],
|
||||
protocol=["UDP", "TCP", "ICMP"],
|
||||
ip_version=["IPv4"],
|
||||
location=["string"],
|
||||
name=["string"],
|
||||
protocol=["UDP"],
|
||||
)
|
||||
assert_matches_type(SummaryDurationResponse, summary, path=["response"])
|
||||
|
||||
|
|
@ -425,22 +361,14 @@ class TestAsyncSummary:
|
|||
@parametrize
|
||||
async def test_method_get_with_all_params(self, async_client: AsyncCloudflare) -> None:
|
||||
summary = await async_client.radar.attacks.layer3.summary.get(
|
||||
asn=["string", "string", "string"],
|
||||
continent=["string", "string", "string"],
|
||||
date_end=[
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
],
|
||||
date_range=["7d", "7d", "7d"],
|
||||
date_start=[
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
],
|
||||
asn=["string"],
|
||||
continent=["string"],
|
||||
date_end=[parse_datetime("2019-12-27T18:11:19.117Z")],
|
||||
date_range=["7d"],
|
||||
date_start=[parse_datetime("2019-12-27T18:11:19.117Z")],
|
||||
format="JSON",
|
||||
location=["string", "string", "string"],
|
||||
name=["string", "string", "string"],
|
||||
location=["string"],
|
||||
name=["string"],
|
||||
)
|
||||
assert_matches_type(SummaryGetResponse, summary, path=["response"])
|
||||
|
||||
|
|
@ -472,23 +400,15 @@ class TestAsyncSummary:
|
|||
@parametrize
|
||||
async def test_method_ip_version_with_all_params(self, async_client: AsyncCloudflare) -> None:
|
||||
summary = await async_client.radar.attacks.layer3.summary.ip_version(
|
||||
continent=["string", "string", "string"],
|
||||
date_end=[
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
],
|
||||
date_range=["7d", "7d", "7d"],
|
||||
date_start=[
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
],
|
||||
continent=["string"],
|
||||
date_end=[parse_datetime("2019-12-27T18:11:19.117Z")],
|
||||
date_range=["7d"],
|
||||
date_start=[parse_datetime("2019-12-27T18:11:19.117Z")],
|
||||
direction="ORIGIN",
|
||||
format="JSON",
|
||||
location=["string", "string", "string"],
|
||||
name=["string", "string", "string"],
|
||||
protocol=["UDP", "TCP", "ICMP"],
|
||||
location=["string"],
|
||||
name=["string"],
|
||||
protocol=["UDP"],
|
||||
)
|
||||
assert_matches_type(SummaryIPVersionResponse, summary, path=["response"])
|
||||
|
||||
|
|
@ -520,23 +440,15 @@ class TestAsyncSummary:
|
|||
@parametrize
|
||||
async def test_method_protocol_with_all_params(self, async_client: AsyncCloudflare) -> None:
|
||||
summary = await async_client.radar.attacks.layer3.summary.protocol(
|
||||
continent=["string", "string", "string"],
|
||||
date_end=[
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
],
|
||||
date_range=["7d", "7d", "7d"],
|
||||
date_start=[
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
],
|
||||
continent=["string"],
|
||||
date_end=[parse_datetime("2019-12-27T18:11:19.117Z")],
|
||||
date_range=["7d"],
|
||||
date_start=[parse_datetime("2019-12-27T18:11:19.117Z")],
|
||||
direction="ORIGIN",
|
||||
format="JSON",
|
||||
ip_version=["IPv4", "IPv6"],
|
||||
location=["string", "string", "string"],
|
||||
name=["string", "string", "string"],
|
||||
ip_version=["IPv4"],
|
||||
location=["string"],
|
||||
name=["string"],
|
||||
)
|
||||
assert_matches_type(SummaryProtocolResponse, summary, path=["response"])
|
||||
|
||||
|
|
@ -568,24 +480,16 @@ class TestAsyncSummary:
|
|||
@parametrize
|
||||
async def test_method_vector_with_all_params(self, async_client: AsyncCloudflare) -> None:
|
||||
summary = await async_client.radar.attacks.layer3.summary.vector(
|
||||
continent=["string", "string", "string"],
|
||||
date_end=[
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
],
|
||||
date_range=["7d", "7d", "7d"],
|
||||
date_start=[
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
],
|
||||
continent=["string"],
|
||||
date_end=[parse_datetime("2019-12-27T18:11:19.117Z")],
|
||||
date_range=["7d"],
|
||||
date_start=[parse_datetime("2019-12-27T18:11:19.117Z")],
|
||||
direction="ORIGIN",
|
||||
format="JSON",
|
||||
ip_version=["IPv4", "IPv6"],
|
||||
location=["string", "string", "string"],
|
||||
name=["string", "string", "string"],
|
||||
protocol=["UDP", "TCP", "ICMP"],
|
||||
ip_version=["IPv4"],
|
||||
location=["string"],
|
||||
name=["string"],
|
||||
protocol=["UDP"],
|
||||
)
|
||||
assert_matches_type(SummaryVectorResponse, summary, path=["response"])
|
||||
|
||||
|
|
|
|||
|
|
@ -36,25 +36,17 @@ class TestTimeseriesGroups:
|
|||
def test_method_bitrate_with_all_params(self, client: Cloudflare) -> None:
|
||||
timeseries_group = client.radar.attacks.layer3.timeseries_groups.bitrate(
|
||||
agg_interval="15m",
|
||||
continent=["string", "string", "string"],
|
||||
date_end=[
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
],
|
||||
date_range=["7d", "7d", "7d"],
|
||||
date_start=[
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
],
|
||||
continent=["string"],
|
||||
date_end=[parse_datetime("2019-12-27T18:11:19.117Z")],
|
||||
date_range=["7d"],
|
||||
date_start=[parse_datetime("2019-12-27T18:11:19.117Z")],
|
||||
direction="ORIGIN",
|
||||
format="JSON",
|
||||
ip_version=["IPv4", "IPv6"],
|
||||
location=["string", "string", "string"],
|
||||
name=["string", "string", "string"],
|
||||
ip_version=["IPv4"],
|
||||
location=["string"],
|
||||
name=["string"],
|
||||
normalization="PERCENTAGE",
|
||||
protocol=["UDP", "TCP", "ICMP"],
|
||||
protocol=["UDP"],
|
||||
)
|
||||
assert_matches_type(TimeseriesGroupBitrateResponse, timeseries_group, path=["response"])
|
||||
|
||||
|
|
@ -87,25 +79,17 @@ class TestTimeseriesGroups:
|
|||
def test_method_duration_with_all_params(self, client: Cloudflare) -> None:
|
||||
timeseries_group = client.radar.attacks.layer3.timeseries_groups.duration(
|
||||
agg_interval="15m",
|
||||
continent=["string", "string", "string"],
|
||||
date_end=[
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
],
|
||||
date_range=["7d", "7d", "7d"],
|
||||
date_start=[
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
],
|
||||
continent=["string"],
|
||||
date_end=[parse_datetime("2019-12-27T18:11:19.117Z")],
|
||||
date_range=["7d"],
|
||||
date_start=[parse_datetime("2019-12-27T18:11:19.117Z")],
|
||||
direction="ORIGIN",
|
||||
format="JSON",
|
||||
ip_version=["IPv4", "IPv6"],
|
||||
location=["string", "string", "string"],
|
||||
name=["string", "string", "string"],
|
||||
ip_version=["IPv4"],
|
||||
location=["string"],
|
||||
name=["string"],
|
||||
normalization="PERCENTAGE",
|
||||
protocol=["UDP", "TCP", "ICMP"],
|
||||
protocol=["UDP"],
|
||||
)
|
||||
assert_matches_type(TimeseriesGroupDurationResponse, timeseries_group, path=["response"])
|
||||
|
||||
|
|
@ -138,22 +122,14 @@ class TestTimeseriesGroups:
|
|||
def test_method_get_with_all_params(self, client: Cloudflare) -> None:
|
||||
timeseries_group = client.radar.attacks.layer3.timeseries_groups.get(
|
||||
agg_interval="15m",
|
||||
asn=["string", "string", "string"],
|
||||
continent=["string", "string", "string"],
|
||||
date_end=[
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
],
|
||||
date_range=["7d", "7d", "7d"],
|
||||
date_start=[
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
],
|
||||
asn=["string"],
|
||||
continent=["string"],
|
||||
date_end=[parse_datetime("2019-12-27T18:11:19.117Z")],
|
||||
date_range=["7d"],
|
||||
date_start=[parse_datetime("2019-12-27T18:11:19.117Z")],
|
||||
format="JSON",
|
||||
location=["string", "string", "string"],
|
||||
name=["string", "string", "string"],
|
||||
location=["string"],
|
||||
name=["string"],
|
||||
)
|
||||
assert_matches_type(TimeseriesGroupGetResponse, timeseries_group, path=["response"])
|
||||
|
||||
|
|
@ -186,26 +162,18 @@ class TestTimeseriesGroups:
|
|||
def test_method_industry_with_all_params(self, client: Cloudflare) -> None:
|
||||
timeseries_group = client.radar.attacks.layer3.timeseries_groups.industry(
|
||||
agg_interval="15m",
|
||||
continent=["string", "string", "string"],
|
||||
date_end=[
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
],
|
||||
date_range=["7d", "7d", "7d"],
|
||||
date_start=[
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
],
|
||||
continent=["string"],
|
||||
date_end=[parse_datetime("2019-12-27T18:11:19.117Z")],
|
||||
date_range=["7d"],
|
||||
date_start=[parse_datetime("2019-12-27T18:11:19.117Z")],
|
||||
direction="ORIGIN",
|
||||
format="JSON",
|
||||
ip_version=["IPv4", "IPv6"],
|
||||
ip_version=["IPv4"],
|
||||
limit_per_group=4,
|
||||
location=["string", "string", "string"],
|
||||
name=["string", "string", "string"],
|
||||
location=["string"],
|
||||
name=["string"],
|
||||
normalization="PERCENTAGE",
|
||||
protocol=["UDP", "TCP", "ICMP"],
|
||||
protocol=["UDP"],
|
||||
)
|
||||
assert_matches_type(TimeseriesGroupIndustryResponse, timeseries_group, path=["response"])
|
||||
|
||||
|
|
@ -238,24 +206,16 @@ class TestTimeseriesGroups:
|
|||
def test_method_ip_version_with_all_params(self, client: Cloudflare) -> None:
|
||||
timeseries_group = client.radar.attacks.layer3.timeseries_groups.ip_version(
|
||||
agg_interval="15m",
|
||||
continent=["string", "string", "string"],
|
||||
date_end=[
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
],
|
||||
date_range=["7d", "7d", "7d"],
|
||||
date_start=[
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
],
|
||||
continent=["string"],
|
||||
date_end=[parse_datetime("2019-12-27T18:11:19.117Z")],
|
||||
date_range=["7d"],
|
||||
date_start=[parse_datetime("2019-12-27T18:11:19.117Z")],
|
||||
direction="ORIGIN",
|
||||
format="JSON",
|
||||
location=["string", "string", "string"],
|
||||
name=["string", "string", "string"],
|
||||
location=["string"],
|
||||
name=["string"],
|
||||
normalization="PERCENTAGE",
|
||||
protocol=["UDP", "TCP", "ICMP"],
|
||||
protocol=["UDP"],
|
||||
)
|
||||
assert_matches_type(TimeseriesGroupIPVersionResponse, timeseries_group, path=["response"])
|
||||
|
||||
|
|
@ -288,23 +248,15 @@ class TestTimeseriesGroups:
|
|||
def test_method_protocol_with_all_params(self, client: Cloudflare) -> None:
|
||||
timeseries_group = client.radar.attacks.layer3.timeseries_groups.protocol(
|
||||
agg_interval="15m",
|
||||
continent=["string", "string", "string"],
|
||||
date_end=[
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
],
|
||||
date_range=["7d", "7d", "7d"],
|
||||
date_start=[
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
],
|
||||
continent=["string"],
|
||||
date_end=[parse_datetime("2019-12-27T18:11:19.117Z")],
|
||||
date_range=["7d"],
|
||||
date_start=[parse_datetime("2019-12-27T18:11:19.117Z")],
|
||||
direction="ORIGIN",
|
||||
format="JSON",
|
||||
ip_version=["IPv4", "IPv6"],
|
||||
location=["string", "string", "string"],
|
||||
name=["string", "string", "string"],
|
||||
ip_version=["IPv4"],
|
||||
location=["string"],
|
||||
name=["string"],
|
||||
normalization="PERCENTAGE",
|
||||
)
|
||||
assert_matches_type(TimeseriesGroupProtocolResponse, timeseries_group, path=["response"])
|
||||
|
|
@ -338,26 +290,18 @@ class TestTimeseriesGroups:
|
|||
def test_method_vector_with_all_params(self, client: Cloudflare) -> None:
|
||||
timeseries_group = client.radar.attacks.layer3.timeseries_groups.vector(
|
||||
agg_interval="15m",
|
||||
continent=["string", "string", "string"],
|
||||
date_end=[
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
],
|
||||
date_range=["7d", "7d", "7d"],
|
||||
date_start=[
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
],
|
||||
continent=["string"],
|
||||
date_end=[parse_datetime("2019-12-27T18:11:19.117Z")],
|
||||
date_range=["7d"],
|
||||
date_start=[parse_datetime("2019-12-27T18:11:19.117Z")],
|
||||
direction="ORIGIN",
|
||||
format="JSON",
|
||||
ip_version=["IPv4", "IPv6"],
|
||||
ip_version=["IPv4"],
|
||||
limit_per_group=4,
|
||||
location=["string", "string", "string"],
|
||||
name=["string", "string", "string"],
|
||||
location=["string"],
|
||||
name=["string"],
|
||||
normalization="PERCENTAGE",
|
||||
protocol=["UDP", "TCP", "ICMP"],
|
||||
protocol=["UDP"],
|
||||
)
|
||||
assert_matches_type(TimeseriesGroupVectorResponse, timeseries_group, path=["response"])
|
||||
|
||||
|
|
@ -390,26 +334,18 @@ class TestTimeseriesGroups:
|
|||
def test_method_vertical_with_all_params(self, client: Cloudflare) -> None:
|
||||
timeseries_group = client.radar.attacks.layer3.timeseries_groups.vertical(
|
||||
agg_interval="15m",
|
||||
continent=["string", "string", "string"],
|
||||
date_end=[
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
],
|
||||
date_range=["7d", "7d", "7d"],
|
||||
date_start=[
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
],
|
||||
continent=["string"],
|
||||
date_end=[parse_datetime("2019-12-27T18:11:19.117Z")],
|
||||
date_range=["7d"],
|
||||
date_start=[parse_datetime("2019-12-27T18:11:19.117Z")],
|
||||
direction="ORIGIN",
|
||||
format="JSON",
|
||||
ip_version=["IPv4", "IPv6"],
|
||||
ip_version=["IPv4"],
|
||||
limit_per_group=4,
|
||||
location=["string", "string", "string"],
|
||||
name=["string", "string", "string"],
|
||||
location=["string"],
|
||||
name=["string"],
|
||||
normalization="PERCENTAGE",
|
||||
protocol=["UDP", "TCP", "ICMP"],
|
||||
protocol=["UDP"],
|
||||
)
|
||||
assert_matches_type(TimeseriesGroupVerticalResponse, timeseries_group, path=["response"])
|
||||
|
||||
|
|
@ -446,25 +382,17 @@ class TestAsyncTimeseriesGroups:
|
|||
async def test_method_bitrate_with_all_params(self, async_client: AsyncCloudflare) -> None:
|
||||
timeseries_group = await async_client.radar.attacks.layer3.timeseries_groups.bitrate(
|
||||
agg_interval="15m",
|
||||
continent=["string", "string", "string"],
|
||||
date_end=[
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
],
|
||||
date_range=["7d", "7d", "7d"],
|
||||
date_start=[
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
],
|
||||
continent=["string"],
|
||||
date_end=[parse_datetime("2019-12-27T18:11:19.117Z")],
|
||||
date_range=["7d"],
|
||||
date_start=[parse_datetime("2019-12-27T18:11:19.117Z")],
|
||||
direction="ORIGIN",
|
||||
format="JSON",
|
||||
ip_version=["IPv4", "IPv6"],
|
||||
location=["string", "string", "string"],
|
||||
name=["string", "string", "string"],
|
||||
ip_version=["IPv4"],
|
||||
location=["string"],
|
||||
name=["string"],
|
||||
normalization="PERCENTAGE",
|
||||
protocol=["UDP", "TCP", "ICMP"],
|
||||
protocol=["UDP"],
|
||||
)
|
||||
assert_matches_type(TimeseriesGroupBitrateResponse, timeseries_group, path=["response"])
|
||||
|
||||
|
|
@ -497,25 +425,17 @@ class TestAsyncTimeseriesGroups:
|
|||
async def test_method_duration_with_all_params(self, async_client: AsyncCloudflare) -> None:
|
||||
timeseries_group = await async_client.radar.attacks.layer3.timeseries_groups.duration(
|
||||
agg_interval="15m",
|
||||
continent=["string", "string", "string"],
|
||||
date_end=[
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
],
|
||||
date_range=["7d", "7d", "7d"],
|
||||
date_start=[
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
],
|
||||
continent=["string"],
|
||||
date_end=[parse_datetime("2019-12-27T18:11:19.117Z")],
|
||||
date_range=["7d"],
|
||||
date_start=[parse_datetime("2019-12-27T18:11:19.117Z")],
|
||||
direction="ORIGIN",
|
||||
format="JSON",
|
||||
ip_version=["IPv4", "IPv6"],
|
||||
location=["string", "string", "string"],
|
||||
name=["string", "string", "string"],
|
||||
ip_version=["IPv4"],
|
||||
location=["string"],
|
||||
name=["string"],
|
||||
normalization="PERCENTAGE",
|
||||
protocol=["UDP", "TCP", "ICMP"],
|
||||
protocol=["UDP"],
|
||||
)
|
||||
assert_matches_type(TimeseriesGroupDurationResponse, timeseries_group, path=["response"])
|
||||
|
||||
|
|
@ -548,22 +468,14 @@ class TestAsyncTimeseriesGroups:
|
|||
async def test_method_get_with_all_params(self, async_client: AsyncCloudflare) -> None:
|
||||
timeseries_group = await async_client.radar.attacks.layer3.timeseries_groups.get(
|
||||
agg_interval="15m",
|
||||
asn=["string", "string", "string"],
|
||||
continent=["string", "string", "string"],
|
||||
date_end=[
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
],
|
||||
date_range=["7d", "7d", "7d"],
|
||||
date_start=[
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
],
|
||||
asn=["string"],
|
||||
continent=["string"],
|
||||
date_end=[parse_datetime("2019-12-27T18:11:19.117Z")],
|
||||
date_range=["7d"],
|
||||
date_start=[parse_datetime("2019-12-27T18:11:19.117Z")],
|
||||
format="JSON",
|
||||
location=["string", "string", "string"],
|
||||
name=["string", "string", "string"],
|
||||
location=["string"],
|
||||
name=["string"],
|
||||
)
|
||||
assert_matches_type(TimeseriesGroupGetResponse, timeseries_group, path=["response"])
|
||||
|
||||
|
|
@ -596,26 +508,18 @@ class TestAsyncTimeseriesGroups:
|
|||
async def test_method_industry_with_all_params(self, async_client: AsyncCloudflare) -> None:
|
||||
timeseries_group = await async_client.radar.attacks.layer3.timeseries_groups.industry(
|
||||
agg_interval="15m",
|
||||
continent=["string", "string", "string"],
|
||||
date_end=[
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
],
|
||||
date_range=["7d", "7d", "7d"],
|
||||
date_start=[
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
],
|
||||
continent=["string"],
|
||||
date_end=[parse_datetime("2019-12-27T18:11:19.117Z")],
|
||||
date_range=["7d"],
|
||||
date_start=[parse_datetime("2019-12-27T18:11:19.117Z")],
|
||||
direction="ORIGIN",
|
||||
format="JSON",
|
||||
ip_version=["IPv4", "IPv6"],
|
||||
ip_version=["IPv4"],
|
||||
limit_per_group=4,
|
||||
location=["string", "string", "string"],
|
||||
name=["string", "string", "string"],
|
||||
location=["string"],
|
||||
name=["string"],
|
||||
normalization="PERCENTAGE",
|
||||
protocol=["UDP", "TCP", "ICMP"],
|
||||
protocol=["UDP"],
|
||||
)
|
||||
assert_matches_type(TimeseriesGroupIndustryResponse, timeseries_group, path=["response"])
|
||||
|
||||
|
|
@ -648,24 +552,16 @@ class TestAsyncTimeseriesGroups:
|
|||
async def test_method_ip_version_with_all_params(self, async_client: AsyncCloudflare) -> None:
|
||||
timeseries_group = await async_client.radar.attacks.layer3.timeseries_groups.ip_version(
|
||||
agg_interval="15m",
|
||||
continent=["string", "string", "string"],
|
||||
date_end=[
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
],
|
||||
date_range=["7d", "7d", "7d"],
|
||||
date_start=[
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
],
|
||||
continent=["string"],
|
||||
date_end=[parse_datetime("2019-12-27T18:11:19.117Z")],
|
||||
date_range=["7d"],
|
||||
date_start=[parse_datetime("2019-12-27T18:11:19.117Z")],
|
||||
direction="ORIGIN",
|
||||
format="JSON",
|
||||
location=["string", "string", "string"],
|
||||
name=["string", "string", "string"],
|
||||
location=["string"],
|
||||
name=["string"],
|
||||
normalization="PERCENTAGE",
|
||||
protocol=["UDP", "TCP", "ICMP"],
|
||||
protocol=["UDP"],
|
||||
)
|
||||
assert_matches_type(TimeseriesGroupIPVersionResponse, timeseries_group, path=["response"])
|
||||
|
||||
|
|
@ -698,23 +594,15 @@ class TestAsyncTimeseriesGroups:
|
|||
async def test_method_protocol_with_all_params(self, async_client: AsyncCloudflare) -> None:
|
||||
timeseries_group = await async_client.radar.attacks.layer3.timeseries_groups.protocol(
|
||||
agg_interval="15m",
|
||||
continent=["string", "string", "string"],
|
||||
date_end=[
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
],
|
||||
date_range=["7d", "7d", "7d"],
|
||||
date_start=[
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
],
|
||||
continent=["string"],
|
||||
date_end=[parse_datetime("2019-12-27T18:11:19.117Z")],
|
||||
date_range=["7d"],
|
||||
date_start=[parse_datetime("2019-12-27T18:11:19.117Z")],
|
||||
direction="ORIGIN",
|
||||
format="JSON",
|
||||
ip_version=["IPv4", "IPv6"],
|
||||
location=["string", "string", "string"],
|
||||
name=["string", "string", "string"],
|
||||
ip_version=["IPv4"],
|
||||
location=["string"],
|
||||
name=["string"],
|
||||
normalization="PERCENTAGE",
|
||||
)
|
||||
assert_matches_type(TimeseriesGroupProtocolResponse, timeseries_group, path=["response"])
|
||||
|
|
@ -748,26 +636,18 @@ class TestAsyncTimeseriesGroups:
|
|||
async def test_method_vector_with_all_params(self, async_client: AsyncCloudflare) -> None:
|
||||
timeseries_group = await async_client.radar.attacks.layer3.timeseries_groups.vector(
|
||||
agg_interval="15m",
|
||||
continent=["string", "string", "string"],
|
||||
date_end=[
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
],
|
||||
date_range=["7d", "7d", "7d"],
|
||||
date_start=[
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
],
|
||||
continent=["string"],
|
||||
date_end=[parse_datetime("2019-12-27T18:11:19.117Z")],
|
||||
date_range=["7d"],
|
||||
date_start=[parse_datetime("2019-12-27T18:11:19.117Z")],
|
||||
direction="ORIGIN",
|
||||
format="JSON",
|
||||
ip_version=["IPv4", "IPv6"],
|
||||
ip_version=["IPv4"],
|
||||
limit_per_group=4,
|
||||
location=["string", "string", "string"],
|
||||
name=["string", "string", "string"],
|
||||
location=["string"],
|
||||
name=["string"],
|
||||
normalization="PERCENTAGE",
|
||||
protocol=["UDP", "TCP", "ICMP"],
|
||||
protocol=["UDP"],
|
||||
)
|
||||
assert_matches_type(TimeseriesGroupVectorResponse, timeseries_group, path=["response"])
|
||||
|
||||
|
|
@ -800,26 +680,18 @@ class TestAsyncTimeseriesGroups:
|
|||
async def test_method_vertical_with_all_params(self, async_client: AsyncCloudflare) -> None:
|
||||
timeseries_group = await async_client.radar.attacks.layer3.timeseries_groups.vertical(
|
||||
agg_interval="15m",
|
||||
continent=["string", "string", "string"],
|
||||
date_end=[
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
],
|
||||
date_range=["7d", "7d", "7d"],
|
||||
date_start=[
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
],
|
||||
continent=["string"],
|
||||
date_end=[parse_datetime("2019-12-27T18:11:19.117Z")],
|
||||
date_range=["7d"],
|
||||
date_start=[parse_datetime("2019-12-27T18:11:19.117Z")],
|
||||
direction="ORIGIN",
|
||||
format="JSON",
|
||||
ip_version=["IPv4", "IPv6"],
|
||||
ip_version=["IPv4"],
|
||||
limit_per_group=4,
|
||||
location=["string", "string", "string"],
|
||||
name=["string", "string", "string"],
|
||||
location=["string"],
|
||||
name=["string"],
|
||||
normalization="PERCENTAGE",
|
||||
protocol=["UDP", "TCP", "ICMP"],
|
||||
protocol=["UDP"],
|
||||
)
|
||||
assert_matches_type(TimeseriesGroupVerticalResponse, timeseries_group, path=["response"])
|
||||
|
||||
|
|
|
|||
|
|
@ -30,27 +30,19 @@ class TestTop:
|
|||
@parametrize
|
||||
def test_method_attacks_with_all_params(self, client: Cloudflare) -> None:
|
||||
top = client.radar.attacks.layer3.top.attacks(
|
||||
continent=["string", "string", "string"],
|
||||
date_end=[
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
],
|
||||
date_range=["7d", "7d", "7d"],
|
||||
date_start=[
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
],
|
||||
continent=["string"],
|
||||
date_end=[parse_datetime("2019-12-27T18:11:19.117Z")],
|
||||
date_range=["7d"],
|
||||
date_start=[parse_datetime("2019-12-27T18:11:19.117Z")],
|
||||
format="JSON",
|
||||
ip_version=["IPv4", "IPv6"],
|
||||
ip_version=["IPv4"],
|
||||
limit=5,
|
||||
limit_direction="ORIGIN",
|
||||
limit_per_location=10,
|
||||
location=["string", "string", "string"],
|
||||
name=["string", "string", "string"],
|
||||
location=["string"],
|
||||
name=["string"],
|
||||
normalization="PERCENTAGE",
|
||||
protocol=["UDP", "TCP", "ICMP"],
|
||||
protocol=["UDP"],
|
||||
)
|
||||
assert_matches_type(TopAttacksResponse, top, path=["response"])
|
||||
|
||||
|
|
@ -82,24 +74,16 @@ class TestTop:
|
|||
@parametrize
|
||||
def test_method_industry_with_all_params(self, client: Cloudflare) -> None:
|
||||
top = client.radar.attacks.layer3.top.industry(
|
||||
continent=["string", "string", "string"],
|
||||
date_end=[
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
],
|
||||
date_range=["7d", "7d", "7d"],
|
||||
date_start=[
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
],
|
||||
continent=["string"],
|
||||
date_end=[parse_datetime("2019-12-27T18:11:19.117Z")],
|
||||
date_range=["7d"],
|
||||
date_start=[parse_datetime("2019-12-27T18:11:19.117Z")],
|
||||
format="JSON",
|
||||
ip_version=["IPv4", "IPv6"],
|
||||
ip_version=["IPv4"],
|
||||
limit=5,
|
||||
location=["string", "string", "string"],
|
||||
name=["string", "string", "string"],
|
||||
protocol=["UDP", "TCP", "ICMP"],
|
||||
location=["string"],
|
||||
name=["string"],
|
||||
protocol=["UDP"],
|
||||
)
|
||||
assert_matches_type(TopIndustryResponse, top, path=["response"])
|
||||
|
||||
|
|
@ -131,24 +115,16 @@ class TestTop:
|
|||
@parametrize
|
||||
def test_method_vertical_with_all_params(self, client: Cloudflare) -> None:
|
||||
top = client.radar.attacks.layer3.top.vertical(
|
||||
continent=["string", "string", "string"],
|
||||
date_end=[
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
],
|
||||
date_range=["7d", "7d", "7d"],
|
||||
date_start=[
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
],
|
||||
continent=["string"],
|
||||
date_end=[parse_datetime("2019-12-27T18:11:19.117Z")],
|
||||
date_range=["7d"],
|
||||
date_start=[parse_datetime("2019-12-27T18:11:19.117Z")],
|
||||
format="JSON",
|
||||
ip_version=["IPv4", "IPv6"],
|
||||
ip_version=["IPv4"],
|
||||
limit=5,
|
||||
location=["string", "string", "string"],
|
||||
name=["string", "string", "string"],
|
||||
protocol=["UDP", "TCP", "ICMP"],
|
||||
location=["string"],
|
||||
name=["string"],
|
||||
protocol=["UDP"],
|
||||
)
|
||||
assert_matches_type(TopVerticalResponse, top, path=["response"])
|
||||
|
||||
|
|
@ -184,27 +160,19 @@ class TestAsyncTop:
|
|||
@parametrize
|
||||
async def test_method_attacks_with_all_params(self, async_client: AsyncCloudflare) -> None:
|
||||
top = await async_client.radar.attacks.layer3.top.attacks(
|
||||
continent=["string", "string", "string"],
|
||||
date_end=[
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
],
|
||||
date_range=["7d", "7d", "7d"],
|
||||
date_start=[
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
],
|
||||
continent=["string"],
|
||||
date_end=[parse_datetime("2019-12-27T18:11:19.117Z")],
|
||||
date_range=["7d"],
|
||||
date_start=[parse_datetime("2019-12-27T18:11:19.117Z")],
|
||||
format="JSON",
|
||||
ip_version=["IPv4", "IPv6"],
|
||||
ip_version=["IPv4"],
|
||||
limit=5,
|
||||
limit_direction="ORIGIN",
|
||||
limit_per_location=10,
|
||||
location=["string", "string", "string"],
|
||||
name=["string", "string", "string"],
|
||||
location=["string"],
|
||||
name=["string"],
|
||||
normalization="PERCENTAGE",
|
||||
protocol=["UDP", "TCP", "ICMP"],
|
||||
protocol=["UDP"],
|
||||
)
|
||||
assert_matches_type(TopAttacksResponse, top, path=["response"])
|
||||
|
||||
|
|
@ -236,24 +204,16 @@ class TestAsyncTop:
|
|||
@parametrize
|
||||
async def test_method_industry_with_all_params(self, async_client: AsyncCloudflare) -> None:
|
||||
top = await async_client.radar.attacks.layer3.top.industry(
|
||||
continent=["string", "string", "string"],
|
||||
date_end=[
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
],
|
||||
date_range=["7d", "7d", "7d"],
|
||||
date_start=[
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
],
|
||||
continent=["string"],
|
||||
date_end=[parse_datetime("2019-12-27T18:11:19.117Z")],
|
||||
date_range=["7d"],
|
||||
date_start=[parse_datetime("2019-12-27T18:11:19.117Z")],
|
||||
format="JSON",
|
||||
ip_version=["IPv4", "IPv6"],
|
||||
ip_version=["IPv4"],
|
||||
limit=5,
|
||||
location=["string", "string", "string"],
|
||||
name=["string", "string", "string"],
|
||||
protocol=["UDP", "TCP", "ICMP"],
|
||||
location=["string"],
|
||||
name=["string"],
|
||||
protocol=["UDP"],
|
||||
)
|
||||
assert_matches_type(TopIndustryResponse, top, path=["response"])
|
||||
|
||||
|
|
@ -285,24 +245,16 @@ class TestAsyncTop:
|
|||
@parametrize
|
||||
async def test_method_vertical_with_all_params(self, async_client: AsyncCloudflare) -> None:
|
||||
top = await async_client.radar.attacks.layer3.top.vertical(
|
||||
continent=["string", "string", "string"],
|
||||
date_end=[
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
],
|
||||
date_range=["7d", "7d", "7d"],
|
||||
date_start=[
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
],
|
||||
continent=["string"],
|
||||
date_end=[parse_datetime("2019-12-27T18:11:19.117Z")],
|
||||
date_range=["7d"],
|
||||
date_start=[parse_datetime("2019-12-27T18:11:19.117Z")],
|
||||
format="JSON",
|
||||
ip_version=["IPv4", "IPv6"],
|
||||
ip_version=["IPv4"],
|
||||
limit=5,
|
||||
location=["string", "string", "string"],
|
||||
name=["string", "string", "string"],
|
||||
protocol=["UDP", "TCP", "ICMP"],
|
||||
location=["string"],
|
||||
name=["string"],
|
||||
protocol=["UDP"],
|
||||
)
|
||||
assert_matches_type(TopVerticalResponse, top, path=["response"])
|
||||
|
||||
|
|
|
|||
|
|
@ -29,24 +29,16 @@ class TestLocations:
|
|||
@parametrize
|
||||
def test_method_origin_with_all_params(self, client: Cloudflare) -> None:
|
||||
location = client.radar.attacks.layer3.top.locations.origin(
|
||||
continent=["string", "string", "string"],
|
||||
date_end=[
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
],
|
||||
date_range=["7d", "7d", "7d"],
|
||||
date_start=[
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
],
|
||||
continent=["string"],
|
||||
date_end=[parse_datetime("2019-12-27T18:11:19.117Z")],
|
||||
date_range=["7d"],
|
||||
date_start=[parse_datetime("2019-12-27T18:11:19.117Z")],
|
||||
format="JSON",
|
||||
ip_version=["IPv4", "IPv6"],
|
||||
ip_version=["IPv4"],
|
||||
limit=5,
|
||||
location=["string", "string", "string"],
|
||||
name=["string", "string", "string"],
|
||||
protocol=["UDP", "TCP", "ICMP"],
|
||||
location=["string"],
|
||||
name=["string"],
|
||||
protocol=["UDP"],
|
||||
)
|
||||
assert_matches_type(LocationOriginResponse, location, path=["response"])
|
||||
|
||||
|
|
@ -78,24 +70,16 @@ class TestLocations:
|
|||
@parametrize
|
||||
def test_method_target_with_all_params(self, client: Cloudflare) -> None:
|
||||
location = client.radar.attacks.layer3.top.locations.target(
|
||||
continent=["string", "string", "string"],
|
||||
date_end=[
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
],
|
||||
date_range=["7d", "7d", "7d"],
|
||||
date_start=[
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
],
|
||||
continent=["string"],
|
||||
date_end=[parse_datetime("2019-12-27T18:11:19.117Z")],
|
||||
date_range=["7d"],
|
||||
date_start=[parse_datetime("2019-12-27T18:11:19.117Z")],
|
||||
format="JSON",
|
||||
ip_version=["IPv4", "IPv6"],
|
||||
ip_version=["IPv4"],
|
||||
limit=5,
|
||||
location=["string", "string", "string"],
|
||||
name=["string", "string", "string"],
|
||||
protocol=["UDP", "TCP", "ICMP"],
|
||||
location=["string"],
|
||||
name=["string"],
|
||||
protocol=["UDP"],
|
||||
)
|
||||
assert_matches_type(LocationTargetResponse, location, path=["response"])
|
||||
|
||||
|
|
@ -131,24 +115,16 @@ class TestAsyncLocations:
|
|||
@parametrize
|
||||
async def test_method_origin_with_all_params(self, async_client: AsyncCloudflare) -> None:
|
||||
location = await async_client.radar.attacks.layer3.top.locations.origin(
|
||||
continent=["string", "string", "string"],
|
||||
date_end=[
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
],
|
||||
date_range=["7d", "7d", "7d"],
|
||||
date_start=[
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
],
|
||||
continent=["string"],
|
||||
date_end=[parse_datetime("2019-12-27T18:11:19.117Z")],
|
||||
date_range=["7d"],
|
||||
date_start=[parse_datetime("2019-12-27T18:11:19.117Z")],
|
||||
format="JSON",
|
||||
ip_version=["IPv4", "IPv6"],
|
||||
ip_version=["IPv4"],
|
||||
limit=5,
|
||||
location=["string", "string", "string"],
|
||||
name=["string", "string", "string"],
|
||||
protocol=["UDP", "TCP", "ICMP"],
|
||||
location=["string"],
|
||||
name=["string"],
|
||||
protocol=["UDP"],
|
||||
)
|
||||
assert_matches_type(LocationOriginResponse, location, path=["response"])
|
||||
|
||||
|
|
@ -180,24 +156,16 @@ class TestAsyncLocations:
|
|||
@parametrize
|
||||
async def test_method_target_with_all_params(self, async_client: AsyncCloudflare) -> None:
|
||||
location = await async_client.radar.attacks.layer3.top.locations.target(
|
||||
continent=["string", "string", "string"],
|
||||
date_end=[
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
],
|
||||
date_range=["7d", "7d", "7d"],
|
||||
date_start=[
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
],
|
||||
continent=["string"],
|
||||
date_end=[parse_datetime("2019-12-27T18:11:19.117Z")],
|
||||
date_range=["7d"],
|
||||
date_start=[parse_datetime("2019-12-27T18:11:19.117Z")],
|
||||
format="JSON",
|
||||
ip_version=["IPv4", "IPv6"],
|
||||
ip_version=["IPv4"],
|
||||
limit=5,
|
||||
location=["string", "string", "string"],
|
||||
name=["string", "string", "string"],
|
||||
protocol=["UDP", "TCP", "ICMP"],
|
||||
location=["string"],
|
||||
name=["string"],
|
||||
protocol=["UDP"],
|
||||
)
|
||||
assert_matches_type(LocationTargetResponse, location, path=["response"])
|
||||
|
||||
|
|
|
|||
|
|
@ -33,22 +33,14 @@ class TestSummary:
|
|||
@parametrize
|
||||
def test_method_get_with_all_params(self, client: Cloudflare) -> None:
|
||||
summary = client.radar.attacks.layer7.summary.get(
|
||||
asn=["string", "string", "string"],
|
||||
continent=["string", "string", "string"],
|
||||
date_end=[
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
],
|
||||
date_range=["7d", "7d", "7d"],
|
||||
date_start=[
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
],
|
||||
asn=["string"],
|
||||
continent=["string"],
|
||||
date_end=[parse_datetime("2019-12-27T18:11:19.117Z")],
|
||||
date_range=["7d"],
|
||||
date_start=[parse_datetime("2019-12-27T18:11:19.117Z")],
|
||||
format="JSON",
|
||||
location=["string", "string", "string"],
|
||||
name=["string", "string", "string"],
|
||||
location=["string"],
|
||||
name=["string"],
|
||||
)
|
||||
assert_matches_type(SummaryGetResponse, summary, path=["response"])
|
||||
|
||||
|
|
@ -80,25 +72,17 @@ class TestSummary:
|
|||
@parametrize
|
||||
def test_method_http_method_with_all_params(self, client: Cloudflare) -> None:
|
||||
summary = client.radar.attacks.layer7.summary.http_method(
|
||||
asn=["string", "string", "string"],
|
||||
continent=["string", "string", "string"],
|
||||
date_end=[
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
],
|
||||
date_range=["7d", "7d", "7d"],
|
||||
date_start=[
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
],
|
||||
asn=["string"],
|
||||
continent=["string"],
|
||||
date_end=[parse_datetime("2019-12-27T18:11:19.117Z")],
|
||||
date_range=["7d"],
|
||||
date_start=[parse_datetime("2019-12-27T18:11:19.117Z")],
|
||||
format="JSON",
|
||||
http_version=["HTTPv1", "HTTPv2", "HTTPv3"],
|
||||
ip_version=["IPv4", "IPv6"],
|
||||
location=["string", "string", "string"],
|
||||
mitigation_product=["DDOS", "WAF", "BOT_MANAGEMENT"],
|
||||
name=["string", "string", "string"],
|
||||
http_version=["HTTPv1"],
|
||||
ip_version=["IPv4"],
|
||||
location=["string"],
|
||||
mitigation_product=["DDOS"],
|
||||
name=["string"],
|
||||
)
|
||||
assert_matches_type(SummaryHTTPMethodResponse, summary, path=["response"])
|
||||
|
||||
|
|
@ -130,25 +114,17 @@ class TestSummary:
|
|||
@parametrize
|
||||
def test_method_http_version_with_all_params(self, client: Cloudflare) -> None:
|
||||
summary = client.radar.attacks.layer7.summary.http_version(
|
||||
asn=["string", "string", "string"],
|
||||
continent=["string", "string", "string"],
|
||||
date_end=[
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
],
|
||||
date_range=["7d", "7d", "7d"],
|
||||
date_start=[
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
],
|
||||
asn=["string"],
|
||||
continent=["string"],
|
||||
date_end=[parse_datetime("2019-12-27T18:11:19.117Z")],
|
||||
date_range=["7d"],
|
||||
date_start=[parse_datetime("2019-12-27T18:11:19.117Z")],
|
||||
format="JSON",
|
||||
http_method=["GET", "POST", "DELETE"],
|
||||
ip_version=["IPv4", "IPv6"],
|
||||
location=["string", "string", "string"],
|
||||
mitigation_product=["DDOS", "WAF", "BOT_MANAGEMENT"],
|
||||
name=["string", "string", "string"],
|
||||
http_method=["GET"],
|
||||
ip_version=["IPv4"],
|
||||
location=["string"],
|
||||
mitigation_product=["DDOS"],
|
||||
name=["string"],
|
||||
)
|
||||
assert_matches_type(SummaryHTTPVersionResponse, summary, path=["response"])
|
||||
|
||||
|
|
@ -180,25 +156,17 @@ class TestSummary:
|
|||
@parametrize
|
||||
def test_method_ip_version_with_all_params(self, client: Cloudflare) -> None:
|
||||
summary = client.radar.attacks.layer7.summary.ip_version(
|
||||
asn=["string", "string", "string"],
|
||||
continent=["string", "string", "string"],
|
||||
date_end=[
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
],
|
||||
date_range=["7d", "7d", "7d"],
|
||||
date_start=[
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
],
|
||||
asn=["string"],
|
||||
continent=["string"],
|
||||
date_end=[parse_datetime("2019-12-27T18:11:19.117Z")],
|
||||
date_range=["7d"],
|
||||
date_start=[parse_datetime("2019-12-27T18:11:19.117Z")],
|
||||
format="JSON",
|
||||
http_method=["GET", "POST", "DELETE"],
|
||||
http_version=["HTTPv1", "HTTPv2", "HTTPv3"],
|
||||
location=["string", "string", "string"],
|
||||
mitigation_product=["DDOS", "WAF", "BOT_MANAGEMENT"],
|
||||
name=["string", "string", "string"],
|
||||
http_method=["GET"],
|
||||
http_version=["HTTPv1"],
|
||||
location=["string"],
|
||||
mitigation_product=["DDOS"],
|
||||
name=["string"],
|
||||
)
|
||||
assert_matches_type(SummaryIPVersionResponse, summary, path=["response"])
|
||||
|
||||
|
|
@ -230,26 +198,18 @@ class TestSummary:
|
|||
@parametrize
|
||||
def test_method_managed_rules_with_all_params(self, client: Cloudflare) -> None:
|
||||
summary = client.radar.attacks.layer7.summary.managed_rules(
|
||||
asn=["string", "string", "string"],
|
||||
continent=["string", "string", "string"],
|
||||
date_end=[
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
],
|
||||
date_range=["7d", "7d", "7d"],
|
||||
date_start=[
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
],
|
||||
asn=["string"],
|
||||
continent=["string"],
|
||||
date_end=[parse_datetime("2019-12-27T18:11:19.117Z")],
|
||||
date_range=["7d"],
|
||||
date_start=[parse_datetime("2019-12-27T18:11:19.117Z")],
|
||||
format="JSON",
|
||||
http_method=["GET", "POST", "DELETE"],
|
||||
http_version=["HTTPv1", "HTTPv2", "HTTPv3"],
|
||||
ip_version=["IPv4", "IPv6"],
|
||||
location=["string", "string", "string"],
|
||||
mitigation_product=["DDOS", "WAF", "BOT_MANAGEMENT"],
|
||||
name=["string", "string", "string"],
|
||||
http_method=["GET"],
|
||||
http_version=["HTTPv1"],
|
||||
ip_version=["IPv4"],
|
||||
location=["string"],
|
||||
mitigation_product=["DDOS"],
|
||||
name=["string"],
|
||||
)
|
||||
assert_matches_type(SummaryManagedRulesResponse, summary, path=["response"])
|
||||
|
||||
|
|
@ -281,25 +241,17 @@ class TestSummary:
|
|||
@parametrize
|
||||
def test_method_mitigation_product_with_all_params(self, client: Cloudflare) -> None:
|
||||
summary = client.radar.attacks.layer7.summary.mitigation_product(
|
||||
asn=["string", "string", "string"],
|
||||
continent=["string", "string", "string"],
|
||||
date_end=[
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
],
|
||||
date_range=["7d", "7d", "7d"],
|
||||
date_start=[
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
],
|
||||
asn=["string"],
|
||||
continent=["string"],
|
||||
date_end=[parse_datetime("2019-12-27T18:11:19.117Z")],
|
||||
date_range=["7d"],
|
||||
date_start=[parse_datetime("2019-12-27T18:11:19.117Z")],
|
||||
format="JSON",
|
||||
http_method=["GET", "POST", "DELETE"],
|
||||
http_version=["HTTPv1", "HTTPv2", "HTTPv3"],
|
||||
ip_version=["IPv4", "IPv6"],
|
||||
location=["string", "string", "string"],
|
||||
name=["string", "string", "string"],
|
||||
http_method=["GET"],
|
||||
http_version=["HTTPv1"],
|
||||
ip_version=["IPv4"],
|
||||
location=["string"],
|
||||
name=["string"],
|
||||
)
|
||||
assert_matches_type(SummaryMitigationProductResponse, summary, path=["response"])
|
||||
|
||||
|
|
@ -335,22 +287,14 @@ class TestAsyncSummary:
|
|||
@parametrize
|
||||
async def test_method_get_with_all_params(self, async_client: AsyncCloudflare) -> None:
|
||||
summary = await async_client.radar.attacks.layer7.summary.get(
|
||||
asn=["string", "string", "string"],
|
||||
continent=["string", "string", "string"],
|
||||
date_end=[
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
],
|
||||
date_range=["7d", "7d", "7d"],
|
||||
date_start=[
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
],
|
||||
asn=["string"],
|
||||
continent=["string"],
|
||||
date_end=[parse_datetime("2019-12-27T18:11:19.117Z")],
|
||||
date_range=["7d"],
|
||||
date_start=[parse_datetime("2019-12-27T18:11:19.117Z")],
|
||||
format="JSON",
|
||||
location=["string", "string", "string"],
|
||||
name=["string", "string", "string"],
|
||||
location=["string"],
|
||||
name=["string"],
|
||||
)
|
||||
assert_matches_type(SummaryGetResponse, summary, path=["response"])
|
||||
|
||||
|
|
@ -382,25 +326,17 @@ class TestAsyncSummary:
|
|||
@parametrize
|
||||
async def test_method_http_method_with_all_params(self, async_client: AsyncCloudflare) -> None:
|
||||
summary = await async_client.radar.attacks.layer7.summary.http_method(
|
||||
asn=["string", "string", "string"],
|
||||
continent=["string", "string", "string"],
|
||||
date_end=[
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
],
|
||||
date_range=["7d", "7d", "7d"],
|
||||
date_start=[
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
],
|
||||
asn=["string"],
|
||||
continent=["string"],
|
||||
date_end=[parse_datetime("2019-12-27T18:11:19.117Z")],
|
||||
date_range=["7d"],
|
||||
date_start=[parse_datetime("2019-12-27T18:11:19.117Z")],
|
||||
format="JSON",
|
||||
http_version=["HTTPv1", "HTTPv2", "HTTPv3"],
|
||||
ip_version=["IPv4", "IPv6"],
|
||||
location=["string", "string", "string"],
|
||||
mitigation_product=["DDOS", "WAF", "BOT_MANAGEMENT"],
|
||||
name=["string", "string", "string"],
|
||||
http_version=["HTTPv1"],
|
||||
ip_version=["IPv4"],
|
||||
location=["string"],
|
||||
mitigation_product=["DDOS"],
|
||||
name=["string"],
|
||||
)
|
||||
assert_matches_type(SummaryHTTPMethodResponse, summary, path=["response"])
|
||||
|
||||
|
|
@ -432,25 +368,17 @@ class TestAsyncSummary:
|
|||
@parametrize
|
||||
async def test_method_http_version_with_all_params(self, async_client: AsyncCloudflare) -> None:
|
||||
summary = await async_client.radar.attacks.layer7.summary.http_version(
|
||||
asn=["string", "string", "string"],
|
||||
continent=["string", "string", "string"],
|
||||
date_end=[
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
],
|
||||
date_range=["7d", "7d", "7d"],
|
||||
date_start=[
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
],
|
||||
asn=["string"],
|
||||
continent=["string"],
|
||||
date_end=[parse_datetime("2019-12-27T18:11:19.117Z")],
|
||||
date_range=["7d"],
|
||||
date_start=[parse_datetime("2019-12-27T18:11:19.117Z")],
|
||||
format="JSON",
|
||||
http_method=["GET", "POST", "DELETE"],
|
||||
ip_version=["IPv4", "IPv6"],
|
||||
location=["string", "string", "string"],
|
||||
mitigation_product=["DDOS", "WAF", "BOT_MANAGEMENT"],
|
||||
name=["string", "string", "string"],
|
||||
http_method=["GET"],
|
||||
ip_version=["IPv4"],
|
||||
location=["string"],
|
||||
mitigation_product=["DDOS"],
|
||||
name=["string"],
|
||||
)
|
||||
assert_matches_type(SummaryHTTPVersionResponse, summary, path=["response"])
|
||||
|
||||
|
|
@ -482,25 +410,17 @@ class TestAsyncSummary:
|
|||
@parametrize
|
||||
async def test_method_ip_version_with_all_params(self, async_client: AsyncCloudflare) -> None:
|
||||
summary = await async_client.radar.attacks.layer7.summary.ip_version(
|
||||
asn=["string", "string", "string"],
|
||||
continent=["string", "string", "string"],
|
||||
date_end=[
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
],
|
||||
date_range=["7d", "7d", "7d"],
|
||||
date_start=[
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
],
|
||||
asn=["string"],
|
||||
continent=["string"],
|
||||
date_end=[parse_datetime("2019-12-27T18:11:19.117Z")],
|
||||
date_range=["7d"],
|
||||
date_start=[parse_datetime("2019-12-27T18:11:19.117Z")],
|
||||
format="JSON",
|
||||
http_method=["GET", "POST", "DELETE"],
|
||||
http_version=["HTTPv1", "HTTPv2", "HTTPv3"],
|
||||
location=["string", "string", "string"],
|
||||
mitigation_product=["DDOS", "WAF", "BOT_MANAGEMENT"],
|
||||
name=["string", "string", "string"],
|
||||
http_method=["GET"],
|
||||
http_version=["HTTPv1"],
|
||||
location=["string"],
|
||||
mitigation_product=["DDOS"],
|
||||
name=["string"],
|
||||
)
|
||||
assert_matches_type(SummaryIPVersionResponse, summary, path=["response"])
|
||||
|
||||
|
|
@ -532,26 +452,18 @@ class TestAsyncSummary:
|
|||
@parametrize
|
||||
async def test_method_managed_rules_with_all_params(self, async_client: AsyncCloudflare) -> None:
|
||||
summary = await async_client.radar.attacks.layer7.summary.managed_rules(
|
||||
asn=["string", "string", "string"],
|
||||
continent=["string", "string", "string"],
|
||||
date_end=[
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
],
|
||||
date_range=["7d", "7d", "7d"],
|
||||
date_start=[
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
],
|
||||
asn=["string"],
|
||||
continent=["string"],
|
||||
date_end=[parse_datetime("2019-12-27T18:11:19.117Z")],
|
||||
date_range=["7d"],
|
||||
date_start=[parse_datetime("2019-12-27T18:11:19.117Z")],
|
||||
format="JSON",
|
||||
http_method=["GET", "POST", "DELETE"],
|
||||
http_version=["HTTPv1", "HTTPv2", "HTTPv3"],
|
||||
ip_version=["IPv4", "IPv6"],
|
||||
location=["string", "string", "string"],
|
||||
mitigation_product=["DDOS", "WAF", "BOT_MANAGEMENT"],
|
||||
name=["string", "string", "string"],
|
||||
http_method=["GET"],
|
||||
http_version=["HTTPv1"],
|
||||
ip_version=["IPv4"],
|
||||
location=["string"],
|
||||
mitigation_product=["DDOS"],
|
||||
name=["string"],
|
||||
)
|
||||
assert_matches_type(SummaryManagedRulesResponse, summary, path=["response"])
|
||||
|
||||
|
|
@ -583,25 +495,17 @@ class TestAsyncSummary:
|
|||
@parametrize
|
||||
async def test_method_mitigation_product_with_all_params(self, async_client: AsyncCloudflare) -> None:
|
||||
summary = await async_client.radar.attacks.layer7.summary.mitigation_product(
|
||||
asn=["string", "string", "string"],
|
||||
continent=["string", "string", "string"],
|
||||
date_end=[
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
],
|
||||
date_range=["7d", "7d", "7d"],
|
||||
date_start=[
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
],
|
||||
asn=["string"],
|
||||
continent=["string"],
|
||||
date_end=[parse_datetime("2019-12-27T18:11:19.117Z")],
|
||||
date_range=["7d"],
|
||||
date_start=[parse_datetime("2019-12-27T18:11:19.117Z")],
|
||||
format="JSON",
|
||||
http_method=["GET", "POST", "DELETE"],
|
||||
http_version=["HTTPv1", "HTTPv2", "HTTPv3"],
|
||||
ip_version=["IPv4", "IPv6"],
|
||||
location=["string", "string", "string"],
|
||||
name=["string", "string", "string"],
|
||||
http_method=["GET"],
|
||||
http_version=["HTTPv1"],
|
||||
ip_version=["IPv4"],
|
||||
location=["string"],
|
||||
name=["string"],
|
||||
)
|
||||
assert_matches_type(SummaryMitigationProductResponse, summary, path=["response"])
|
||||
|
||||
|
|
|
|||
|
|
@ -36,22 +36,14 @@ class TestTimeseriesGroups:
|
|||
def test_method_get_with_all_params(self, client: Cloudflare) -> None:
|
||||
timeseries_group = client.radar.attacks.layer7.timeseries_groups.get(
|
||||
agg_interval="15m",
|
||||
asn=["string", "string", "string"],
|
||||
continent=["string", "string", "string"],
|
||||
date_end=[
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
],
|
||||
date_range=["7d", "7d", "7d"],
|
||||
date_start=[
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
],
|
||||
asn=["string"],
|
||||
continent=["string"],
|
||||
date_end=[parse_datetime("2019-12-27T18:11:19.117Z")],
|
||||
date_range=["7d"],
|
||||
date_start=[parse_datetime("2019-12-27T18:11:19.117Z")],
|
||||
format="JSON",
|
||||
location=["string", "string", "string"],
|
||||
name=["string", "string", "string"],
|
||||
location=["string"],
|
||||
name=["string"],
|
||||
)
|
||||
assert_matches_type(TimeseriesGroupGetResponse, timeseries_group, path=["response"])
|
||||
|
||||
|
|
@ -84,25 +76,17 @@ class TestTimeseriesGroups:
|
|||
def test_method_http_method_with_all_params(self, client: Cloudflare) -> None:
|
||||
timeseries_group = client.radar.attacks.layer7.timeseries_groups.http_method(
|
||||
agg_interval="15m",
|
||||
asn=["string", "string", "string"],
|
||||
continent=["string", "string", "string"],
|
||||
date_end=[
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
],
|
||||
date_range=["7d", "7d", "7d"],
|
||||
date_start=[
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
],
|
||||
asn=["string"],
|
||||
continent=["string"],
|
||||
date_end=[parse_datetime("2019-12-27T18:11:19.117Z")],
|
||||
date_range=["7d"],
|
||||
date_start=[parse_datetime("2019-12-27T18:11:19.117Z")],
|
||||
format="JSON",
|
||||
http_version=["HTTPv1", "HTTPv2", "HTTPv3"],
|
||||
ip_version=["IPv4", "IPv6"],
|
||||
location=["string", "string", "string"],
|
||||
mitigation_product=["DDOS", "WAF", "BOT_MANAGEMENT"],
|
||||
name=["string", "string", "string"],
|
||||
http_version=["HTTPv1"],
|
||||
ip_version=["IPv4"],
|
||||
location=["string"],
|
||||
mitigation_product=["DDOS"],
|
||||
name=["string"],
|
||||
normalization="PERCENTAGE",
|
||||
)
|
||||
assert_matches_type(TimeseriesGroupHTTPMethodResponse, timeseries_group, path=["response"])
|
||||
|
|
@ -136,25 +120,17 @@ class TestTimeseriesGroups:
|
|||
def test_method_http_version_with_all_params(self, client: Cloudflare) -> None:
|
||||
timeseries_group = client.radar.attacks.layer7.timeseries_groups.http_version(
|
||||
agg_interval="15m",
|
||||
asn=["string", "string", "string"],
|
||||
continent=["string", "string", "string"],
|
||||
date_end=[
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
],
|
||||
date_range=["7d", "7d", "7d"],
|
||||
date_start=[
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
],
|
||||
asn=["string"],
|
||||
continent=["string"],
|
||||
date_end=[parse_datetime("2019-12-27T18:11:19.117Z")],
|
||||
date_range=["7d"],
|
||||
date_start=[parse_datetime("2019-12-27T18:11:19.117Z")],
|
||||
format="JSON",
|
||||
http_method=["GET", "POST", "DELETE"],
|
||||
ip_version=["IPv4", "IPv6"],
|
||||
location=["string", "string", "string"],
|
||||
mitigation_product=["DDOS", "WAF", "BOT_MANAGEMENT"],
|
||||
name=["string", "string", "string"],
|
||||
http_method=["GET"],
|
||||
ip_version=["IPv4"],
|
||||
location=["string"],
|
||||
mitigation_product=["DDOS"],
|
||||
name=["string"],
|
||||
normalization="PERCENTAGE",
|
||||
)
|
||||
assert_matches_type(TimeseriesGroupHTTPVersionResponse, timeseries_group, path=["response"])
|
||||
|
|
@ -188,27 +164,19 @@ class TestTimeseriesGroups:
|
|||
def test_method_industry_with_all_params(self, client: Cloudflare) -> None:
|
||||
timeseries_group = client.radar.attacks.layer7.timeseries_groups.industry(
|
||||
agg_interval="15m",
|
||||
asn=["string", "string", "string"],
|
||||
continent=["string", "string", "string"],
|
||||
date_end=[
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
],
|
||||
date_range=["7d", "7d", "7d"],
|
||||
date_start=[
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
],
|
||||
asn=["string"],
|
||||
continent=["string"],
|
||||
date_end=[parse_datetime("2019-12-27T18:11:19.117Z")],
|
||||
date_range=["7d"],
|
||||
date_start=[parse_datetime("2019-12-27T18:11:19.117Z")],
|
||||
format="JSON",
|
||||
http_method=["GET", "POST", "DELETE"],
|
||||
http_version=["HTTPv1", "HTTPv2", "HTTPv3"],
|
||||
ip_version=["IPv4", "IPv6"],
|
||||
http_method=["GET"],
|
||||
http_version=["HTTPv1"],
|
||||
ip_version=["IPv4"],
|
||||
limit_per_group=4,
|
||||
location=["string", "string", "string"],
|
||||
mitigation_product=["DDOS", "WAF", "BOT_MANAGEMENT"],
|
||||
name=["string", "string", "string"],
|
||||
location=["string"],
|
||||
mitigation_product=["DDOS"],
|
||||
name=["string"],
|
||||
normalization="PERCENTAGE",
|
||||
)
|
||||
assert_matches_type(TimeseriesGroupIndustryResponse, timeseries_group, path=["response"])
|
||||
|
|
@ -242,25 +210,17 @@ class TestTimeseriesGroups:
|
|||
def test_method_ip_version_with_all_params(self, client: Cloudflare) -> None:
|
||||
timeseries_group = client.radar.attacks.layer7.timeseries_groups.ip_version(
|
||||
agg_interval="15m",
|
||||
asn=["string", "string", "string"],
|
||||
continent=["string", "string", "string"],
|
||||
date_end=[
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
],
|
||||
date_range=["7d", "7d", "7d"],
|
||||
date_start=[
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
],
|
||||
asn=["string"],
|
||||
continent=["string"],
|
||||
date_end=[parse_datetime("2019-12-27T18:11:19.117Z")],
|
||||
date_range=["7d"],
|
||||
date_start=[parse_datetime("2019-12-27T18:11:19.117Z")],
|
||||
format="JSON",
|
||||
http_method=["GET", "POST", "DELETE"],
|
||||
http_version=["HTTPv1", "HTTPv2", "HTTPv3"],
|
||||
location=["string", "string", "string"],
|
||||
mitigation_product=["DDOS", "WAF", "BOT_MANAGEMENT"],
|
||||
name=["string", "string", "string"],
|
||||
http_method=["GET"],
|
||||
http_version=["HTTPv1"],
|
||||
location=["string"],
|
||||
mitigation_product=["DDOS"],
|
||||
name=["string"],
|
||||
normalization="PERCENTAGE",
|
||||
)
|
||||
assert_matches_type(TimeseriesGroupIPVersionResponse, timeseries_group, path=["response"])
|
||||
|
|
@ -294,26 +254,18 @@ class TestTimeseriesGroups:
|
|||
def test_method_managed_rules_with_all_params(self, client: Cloudflare) -> None:
|
||||
timeseries_group = client.radar.attacks.layer7.timeseries_groups.managed_rules(
|
||||
agg_interval="15m",
|
||||
asn=["string", "string", "string"],
|
||||
continent=["string", "string", "string"],
|
||||
date_end=[
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
],
|
||||
date_range=["7d", "7d", "7d"],
|
||||
date_start=[
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
],
|
||||
asn=["string"],
|
||||
continent=["string"],
|
||||
date_end=[parse_datetime("2019-12-27T18:11:19.117Z")],
|
||||
date_range=["7d"],
|
||||
date_start=[parse_datetime("2019-12-27T18:11:19.117Z")],
|
||||
format="JSON",
|
||||
http_method=["GET", "POST", "DELETE"],
|
||||
http_version=["HTTPv1", "HTTPv2", "HTTPv3"],
|
||||
ip_version=["IPv4", "IPv6"],
|
||||
location=["string", "string", "string"],
|
||||
mitigation_product=["DDOS", "WAF", "BOT_MANAGEMENT"],
|
||||
name=["string", "string", "string"],
|
||||
http_method=["GET"],
|
||||
http_version=["HTTPv1"],
|
||||
ip_version=["IPv4"],
|
||||
location=["string"],
|
||||
mitigation_product=["DDOS"],
|
||||
name=["string"],
|
||||
normalization="PERCENTAGE",
|
||||
)
|
||||
assert_matches_type(TimeseriesGroupManagedRulesResponse, timeseries_group, path=["response"])
|
||||
|
|
@ -347,25 +299,17 @@ class TestTimeseriesGroups:
|
|||
def test_method_mitigation_product_with_all_params(self, client: Cloudflare) -> None:
|
||||
timeseries_group = client.radar.attacks.layer7.timeseries_groups.mitigation_product(
|
||||
agg_interval="15m",
|
||||
asn=["string", "string", "string"],
|
||||
continent=["string", "string", "string"],
|
||||
date_end=[
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
],
|
||||
date_range=["7d", "7d", "7d"],
|
||||
date_start=[
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
],
|
||||
asn=["string"],
|
||||
continent=["string"],
|
||||
date_end=[parse_datetime("2019-12-27T18:11:19.117Z")],
|
||||
date_range=["7d"],
|
||||
date_start=[parse_datetime("2019-12-27T18:11:19.117Z")],
|
||||
format="JSON",
|
||||
http_method=["GET", "POST", "DELETE"],
|
||||
http_version=["HTTPv1", "HTTPv2", "HTTPv3"],
|
||||
ip_version=["IPv4", "IPv6"],
|
||||
location=["string", "string", "string"],
|
||||
name=["string", "string", "string"],
|
||||
http_method=["GET"],
|
||||
http_version=["HTTPv1"],
|
||||
ip_version=["IPv4"],
|
||||
location=["string"],
|
||||
name=["string"],
|
||||
normalization="PERCENTAGE",
|
||||
)
|
||||
assert_matches_type(TimeseriesGroupMitigationProductResponse, timeseries_group, path=["response"])
|
||||
|
|
@ -399,27 +343,19 @@ class TestTimeseriesGroups:
|
|||
def test_method_vertical_with_all_params(self, client: Cloudflare) -> None:
|
||||
timeseries_group = client.radar.attacks.layer7.timeseries_groups.vertical(
|
||||
agg_interval="15m",
|
||||
asn=["string", "string", "string"],
|
||||
continent=["string", "string", "string"],
|
||||
date_end=[
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
],
|
||||
date_range=["7d", "7d", "7d"],
|
||||
date_start=[
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
],
|
||||
asn=["string"],
|
||||
continent=["string"],
|
||||
date_end=[parse_datetime("2019-12-27T18:11:19.117Z")],
|
||||
date_range=["7d"],
|
||||
date_start=[parse_datetime("2019-12-27T18:11:19.117Z")],
|
||||
format="JSON",
|
||||
http_method=["GET", "POST", "DELETE"],
|
||||
http_version=["HTTPv1", "HTTPv2", "HTTPv3"],
|
||||
ip_version=["IPv4", "IPv6"],
|
||||
http_method=["GET"],
|
||||
http_version=["HTTPv1"],
|
||||
ip_version=["IPv4"],
|
||||
limit_per_group=4,
|
||||
location=["string", "string", "string"],
|
||||
mitigation_product=["DDOS", "WAF", "BOT_MANAGEMENT"],
|
||||
name=["string", "string", "string"],
|
||||
location=["string"],
|
||||
mitigation_product=["DDOS"],
|
||||
name=["string"],
|
||||
normalization="PERCENTAGE",
|
||||
)
|
||||
assert_matches_type(TimeseriesGroupVerticalResponse, timeseries_group, path=["response"])
|
||||
|
|
@ -457,22 +393,14 @@ class TestAsyncTimeseriesGroups:
|
|||
async def test_method_get_with_all_params(self, async_client: AsyncCloudflare) -> None:
|
||||
timeseries_group = await async_client.radar.attacks.layer7.timeseries_groups.get(
|
||||
agg_interval="15m",
|
||||
asn=["string", "string", "string"],
|
||||
continent=["string", "string", "string"],
|
||||
date_end=[
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
],
|
||||
date_range=["7d", "7d", "7d"],
|
||||
date_start=[
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
],
|
||||
asn=["string"],
|
||||
continent=["string"],
|
||||
date_end=[parse_datetime("2019-12-27T18:11:19.117Z")],
|
||||
date_range=["7d"],
|
||||
date_start=[parse_datetime("2019-12-27T18:11:19.117Z")],
|
||||
format="JSON",
|
||||
location=["string", "string", "string"],
|
||||
name=["string", "string", "string"],
|
||||
location=["string"],
|
||||
name=["string"],
|
||||
)
|
||||
assert_matches_type(TimeseriesGroupGetResponse, timeseries_group, path=["response"])
|
||||
|
||||
|
|
@ -505,25 +433,17 @@ class TestAsyncTimeseriesGroups:
|
|||
async def test_method_http_method_with_all_params(self, async_client: AsyncCloudflare) -> None:
|
||||
timeseries_group = await async_client.radar.attacks.layer7.timeseries_groups.http_method(
|
||||
agg_interval="15m",
|
||||
asn=["string", "string", "string"],
|
||||
continent=["string", "string", "string"],
|
||||
date_end=[
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
],
|
||||
date_range=["7d", "7d", "7d"],
|
||||
date_start=[
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
],
|
||||
asn=["string"],
|
||||
continent=["string"],
|
||||
date_end=[parse_datetime("2019-12-27T18:11:19.117Z")],
|
||||
date_range=["7d"],
|
||||
date_start=[parse_datetime("2019-12-27T18:11:19.117Z")],
|
||||
format="JSON",
|
||||
http_version=["HTTPv1", "HTTPv2", "HTTPv3"],
|
||||
ip_version=["IPv4", "IPv6"],
|
||||
location=["string", "string", "string"],
|
||||
mitigation_product=["DDOS", "WAF", "BOT_MANAGEMENT"],
|
||||
name=["string", "string", "string"],
|
||||
http_version=["HTTPv1"],
|
||||
ip_version=["IPv4"],
|
||||
location=["string"],
|
||||
mitigation_product=["DDOS"],
|
||||
name=["string"],
|
||||
normalization="PERCENTAGE",
|
||||
)
|
||||
assert_matches_type(TimeseriesGroupHTTPMethodResponse, timeseries_group, path=["response"])
|
||||
|
|
@ -557,25 +477,17 @@ class TestAsyncTimeseriesGroups:
|
|||
async def test_method_http_version_with_all_params(self, async_client: AsyncCloudflare) -> None:
|
||||
timeseries_group = await async_client.radar.attacks.layer7.timeseries_groups.http_version(
|
||||
agg_interval="15m",
|
||||
asn=["string", "string", "string"],
|
||||
continent=["string", "string", "string"],
|
||||
date_end=[
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
],
|
||||
date_range=["7d", "7d", "7d"],
|
||||
date_start=[
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
],
|
||||
asn=["string"],
|
||||
continent=["string"],
|
||||
date_end=[parse_datetime("2019-12-27T18:11:19.117Z")],
|
||||
date_range=["7d"],
|
||||
date_start=[parse_datetime("2019-12-27T18:11:19.117Z")],
|
||||
format="JSON",
|
||||
http_method=["GET", "POST", "DELETE"],
|
||||
ip_version=["IPv4", "IPv6"],
|
||||
location=["string", "string", "string"],
|
||||
mitigation_product=["DDOS", "WAF", "BOT_MANAGEMENT"],
|
||||
name=["string", "string", "string"],
|
||||
http_method=["GET"],
|
||||
ip_version=["IPv4"],
|
||||
location=["string"],
|
||||
mitigation_product=["DDOS"],
|
||||
name=["string"],
|
||||
normalization="PERCENTAGE",
|
||||
)
|
||||
assert_matches_type(TimeseriesGroupHTTPVersionResponse, timeseries_group, path=["response"])
|
||||
|
|
@ -609,27 +521,19 @@ class TestAsyncTimeseriesGroups:
|
|||
async def test_method_industry_with_all_params(self, async_client: AsyncCloudflare) -> None:
|
||||
timeseries_group = await async_client.radar.attacks.layer7.timeseries_groups.industry(
|
||||
agg_interval="15m",
|
||||
asn=["string", "string", "string"],
|
||||
continent=["string", "string", "string"],
|
||||
date_end=[
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
],
|
||||
date_range=["7d", "7d", "7d"],
|
||||
date_start=[
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
],
|
||||
asn=["string"],
|
||||
continent=["string"],
|
||||
date_end=[parse_datetime("2019-12-27T18:11:19.117Z")],
|
||||
date_range=["7d"],
|
||||
date_start=[parse_datetime("2019-12-27T18:11:19.117Z")],
|
||||
format="JSON",
|
||||
http_method=["GET", "POST", "DELETE"],
|
||||
http_version=["HTTPv1", "HTTPv2", "HTTPv3"],
|
||||
ip_version=["IPv4", "IPv6"],
|
||||
http_method=["GET"],
|
||||
http_version=["HTTPv1"],
|
||||
ip_version=["IPv4"],
|
||||
limit_per_group=4,
|
||||
location=["string", "string", "string"],
|
||||
mitigation_product=["DDOS", "WAF", "BOT_MANAGEMENT"],
|
||||
name=["string", "string", "string"],
|
||||
location=["string"],
|
||||
mitigation_product=["DDOS"],
|
||||
name=["string"],
|
||||
normalization="PERCENTAGE",
|
||||
)
|
||||
assert_matches_type(TimeseriesGroupIndustryResponse, timeseries_group, path=["response"])
|
||||
|
|
@ -663,25 +567,17 @@ class TestAsyncTimeseriesGroups:
|
|||
async def test_method_ip_version_with_all_params(self, async_client: AsyncCloudflare) -> None:
|
||||
timeseries_group = await async_client.radar.attacks.layer7.timeseries_groups.ip_version(
|
||||
agg_interval="15m",
|
||||
asn=["string", "string", "string"],
|
||||
continent=["string", "string", "string"],
|
||||
date_end=[
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
],
|
||||
date_range=["7d", "7d", "7d"],
|
||||
date_start=[
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
],
|
||||
asn=["string"],
|
||||
continent=["string"],
|
||||
date_end=[parse_datetime("2019-12-27T18:11:19.117Z")],
|
||||
date_range=["7d"],
|
||||
date_start=[parse_datetime("2019-12-27T18:11:19.117Z")],
|
||||
format="JSON",
|
||||
http_method=["GET", "POST", "DELETE"],
|
||||
http_version=["HTTPv1", "HTTPv2", "HTTPv3"],
|
||||
location=["string", "string", "string"],
|
||||
mitigation_product=["DDOS", "WAF", "BOT_MANAGEMENT"],
|
||||
name=["string", "string", "string"],
|
||||
http_method=["GET"],
|
||||
http_version=["HTTPv1"],
|
||||
location=["string"],
|
||||
mitigation_product=["DDOS"],
|
||||
name=["string"],
|
||||
normalization="PERCENTAGE",
|
||||
)
|
||||
assert_matches_type(TimeseriesGroupIPVersionResponse, timeseries_group, path=["response"])
|
||||
|
|
@ -715,26 +611,18 @@ class TestAsyncTimeseriesGroups:
|
|||
async def test_method_managed_rules_with_all_params(self, async_client: AsyncCloudflare) -> None:
|
||||
timeseries_group = await async_client.radar.attacks.layer7.timeseries_groups.managed_rules(
|
||||
agg_interval="15m",
|
||||
asn=["string", "string", "string"],
|
||||
continent=["string", "string", "string"],
|
||||
date_end=[
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
],
|
||||
date_range=["7d", "7d", "7d"],
|
||||
date_start=[
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
],
|
||||
asn=["string"],
|
||||
continent=["string"],
|
||||
date_end=[parse_datetime("2019-12-27T18:11:19.117Z")],
|
||||
date_range=["7d"],
|
||||
date_start=[parse_datetime("2019-12-27T18:11:19.117Z")],
|
||||
format="JSON",
|
||||
http_method=["GET", "POST", "DELETE"],
|
||||
http_version=["HTTPv1", "HTTPv2", "HTTPv3"],
|
||||
ip_version=["IPv4", "IPv6"],
|
||||
location=["string", "string", "string"],
|
||||
mitigation_product=["DDOS", "WAF", "BOT_MANAGEMENT"],
|
||||
name=["string", "string", "string"],
|
||||
http_method=["GET"],
|
||||
http_version=["HTTPv1"],
|
||||
ip_version=["IPv4"],
|
||||
location=["string"],
|
||||
mitigation_product=["DDOS"],
|
||||
name=["string"],
|
||||
normalization="PERCENTAGE",
|
||||
)
|
||||
assert_matches_type(TimeseriesGroupManagedRulesResponse, timeseries_group, path=["response"])
|
||||
|
|
@ -768,25 +656,17 @@ class TestAsyncTimeseriesGroups:
|
|||
async def test_method_mitigation_product_with_all_params(self, async_client: AsyncCloudflare) -> None:
|
||||
timeseries_group = await async_client.radar.attacks.layer7.timeseries_groups.mitigation_product(
|
||||
agg_interval="15m",
|
||||
asn=["string", "string", "string"],
|
||||
continent=["string", "string", "string"],
|
||||
date_end=[
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
],
|
||||
date_range=["7d", "7d", "7d"],
|
||||
date_start=[
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
],
|
||||
asn=["string"],
|
||||
continent=["string"],
|
||||
date_end=[parse_datetime("2019-12-27T18:11:19.117Z")],
|
||||
date_range=["7d"],
|
||||
date_start=[parse_datetime("2019-12-27T18:11:19.117Z")],
|
||||
format="JSON",
|
||||
http_method=["GET", "POST", "DELETE"],
|
||||
http_version=["HTTPv1", "HTTPv2", "HTTPv3"],
|
||||
ip_version=["IPv4", "IPv6"],
|
||||
location=["string", "string", "string"],
|
||||
name=["string", "string", "string"],
|
||||
http_method=["GET"],
|
||||
http_version=["HTTPv1"],
|
||||
ip_version=["IPv4"],
|
||||
location=["string"],
|
||||
name=["string"],
|
||||
normalization="PERCENTAGE",
|
||||
)
|
||||
assert_matches_type(TimeseriesGroupMitigationProductResponse, timeseries_group, path=["response"])
|
||||
|
|
@ -820,27 +700,19 @@ class TestAsyncTimeseriesGroups:
|
|||
async def test_method_vertical_with_all_params(self, async_client: AsyncCloudflare) -> None:
|
||||
timeseries_group = await async_client.radar.attacks.layer7.timeseries_groups.vertical(
|
||||
agg_interval="15m",
|
||||
asn=["string", "string", "string"],
|
||||
continent=["string", "string", "string"],
|
||||
date_end=[
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
],
|
||||
date_range=["7d", "7d", "7d"],
|
||||
date_start=[
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
],
|
||||
asn=["string"],
|
||||
continent=["string"],
|
||||
date_end=[parse_datetime("2019-12-27T18:11:19.117Z")],
|
||||
date_range=["7d"],
|
||||
date_start=[parse_datetime("2019-12-27T18:11:19.117Z")],
|
||||
format="JSON",
|
||||
http_method=["GET", "POST", "DELETE"],
|
||||
http_version=["HTTPv1", "HTTPv2", "HTTPv3"],
|
||||
ip_version=["IPv4", "IPv6"],
|
||||
http_method=["GET"],
|
||||
http_version=["HTTPv1"],
|
||||
ip_version=["IPv4"],
|
||||
limit_per_group=4,
|
||||
location=["string", "string", "string"],
|
||||
mitigation_product=["DDOS", "WAF", "BOT_MANAGEMENT"],
|
||||
name=["string", "string", "string"],
|
||||
location=["string"],
|
||||
mitigation_product=["DDOS"],
|
||||
name=["string"],
|
||||
normalization="PERCENTAGE",
|
||||
)
|
||||
assert_matches_type(TimeseriesGroupVerticalResponse, timeseries_group, path=["response"])
|
||||
|
|
|
|||
|
|
@ -30,30 +30,22 @@ class TestTop:
|
|||
@parametrize
|
||||
def test_method_attacks_with_all_params(self, client: Cloudflare) -> None:
|
||||
top = client.radar.attacks.layer7.top.attacks(
|
||||
asn=["string", "string", "string"],
|
||||
continent=["string", "string", "string"],
|
||||
date_end=[
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
],
|
||||
date_range=["7d", "7d", "7d"],
|
||||
date_start=[
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
],
|
||||
asn=["string"],
|
||||
continent=["string"],
|
||||
date_end=[parse_datetime("2019-12-27T18:11:19.117Z")],
|
||||
date_range=["7d"],
|
||||
date_start=[parse_datetime("2019-12-27T18:11:19.117Z")],
|
||||
format="JSON",
|
||||
http_method=["GET", "POST", "DELETE"],
|
||||
http_version=["HTTPv1", "HTTPv2", "HTTPv3"],
|
||||
ip_version=["IPv4", "IPv6"],
|
||||
http_method=["GET"],
|
||||
http_version=["HTTPv1"],
|
||||
ip_version=["IPv4"],
|
||||
limit=5,
|
||||
limit_direction="ORIGIN",
|
||||
limit_per_location=10,
|
||||
location=["string", "string", "string"],
|
||||
location=["string"],
|
||||
magnitude="AFFECTED_ZONES",
|
||||
mitigation_product=["DDOS", "WAF", "BOT_MANAGEMENT"],
|
||||
name=["string", "string", "string"],
|
||||
mitigation_product=["DDOS"],
|
||||
name=["string"],
|
||||
normalization="PERCENTAGE",
|
||||
)
|
||||
assert_matches_type(TopAttacksResponse, top, path=["response"])
|
||||
|
|
@ -86,27 +78,19 @@ class TestTop:
|
|||
@parametrize
|
||||
def test_method_industry_with_all_params(self, client: Cloudflare) -> None:
|
||||
top = client.radar.attacks.layer7.top.industry(
|
||||
asn=["string", "string", "string"],
|
||||
continent=["string", "string", "string"],
|
||||
date_end=[
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
],
|
||||
date_range=["7d", "7d", "7d"],
|
||||
date_start=[
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
],
|
||||
asn=["string"],
|
||||
continent=["string"],
|
||||
date_end=[parse_datetime("2019-12-27T18:11:19.117Z")],
|
||||
date_range=["7d"],
|
||||
date_start=[parse_datetime("2019-12-27T18:11:19.117Z")],
|
||||
format="JSON",
|
||||
http_method=["GET", "POST", "DELETE"],
|
||||
http_version=["HTTPv1", "HTTPv2", "HTTPv3"],
|
||||
ip_version=["IPv4", "IPv6"],
|
||||
http_method=["GET"],
|
||||
http_version=["HTTPv1"],
|
||||
ip_version=["IPv4"],
|
||||
limit=5,
|
||||
location=["string", "string", "string"],
|
||||
mitigation_product=["DDOS", "WAF", "BOT_MANAGEMENT"],
|
||||
name=["string", "string", "string"],
|
||||
location=["string"],
|
||||
mitigation_product=["DDOS"],
|
||||
name=["string"],
|
||||
)
|
||||
assert_matches_type(TopIndustryResponse, top, path=["response"])
|
||||
|
||||
|
|
@ -138,27 +122,19 @@ class TestTop:
|
|||
@parametrize
|
||||
def test_method_vertical_with_all_params(self, client: Cloudflare) -> None:
|
||||
top = client.radar.attacks.layer7.top.vertical(
|
||||
asn=["string", "string", "string"],
|
||||
continent=["string", "string", "string"],
|
||||
date_end=[
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
],
|
||||
date_range=["7d", "7d", "7d"],
|
||||
date_start=[
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
],
|
||||
asn=["string"],
|
||||
continent=["string"],
|
||||
date_end=[parse_datetime("2019-12-27T18:11:19.117Z")],
|
||||
date_range=["7d"],
|
||||
date_start=[parse_datetime("2019-12-27T18:11:19.117Z")],
|
||||
format="JSON",
|
||||
http_method=["GET", "POST", "DELETE"],
|
||||
http_version=["HTTPv1", "HTTPv2", "HTTPv3"],
|
||||
ip_version=["IPv4", "IPv6"],
|
||||
http_method=["GET"],
|
||||
http_version=["HTTPv1"],
|
||||
ip_version=["IPv4"],
|
||||
limit=5,
|
||||
location=["string", "string", "string"],
|
||||
mitigation_product=["DDOS", "WAF", "BOT_MANAGEMENT"],
|
||||
name=["string", "string", "string"],
|
||||
location=["string"],
|
||||
mitigation_product=["DDOS"],
|
||||
name=["string"],
|
||||
)
|
||||
assert_matches_type(TopVerticalResponse, top, path=["response"])
|
||||
|
||||
|
|
@ -194,30 +170,22 @@ class TestAsyncTop:
|
|||
@parametrize
|
||||
async def test_method_attacks_with_all_params(self, async_client: AsyncCloudflare) -> None:
|
||||
top = await async_client.radar.attacks.layer7.top.attacks(
|
||||
asn=["string", "string", "string"],
|
||||
continent=["string", "string", "string"],
|
||||
date_end=[
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
],
|
||||
date_range=["7d", "7d", "7d"],
|
||||
date_start=[
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
],
|
||||
asn=["string"],
|
||||
continent=["string"],
|
||||
date_end=[parse_datetime("2019-12-27T18:11:19.117Z")],
|
||||
date_range=["7d"],
|
||||
date_start=[parse_datetime("2019-12-27T18:11:19.117Z")],
|
||||
format="JSON",
|
||||
http_method=["GET", "POST", "DELETE"],
|
||||
http_version=["HTTPv1", "HTTPv2", "HTTPv3"],
|
||||
ip_version=["IPv4", "IPv6"],
|
||||
http_method=["GET"],
|
||||
http_version=["HTTPv1"],
|
||||
ip_version=["IPv4"],
|
||||
limit=5,
|
||||
limit_direction="ORIGIN",
|
||||
limit_per_location=10,
|
||||
location=["string", "string", "string"],
|
||||
location=["string"],
|
||||
magnitude="AFFECTED_ZONES",
|
||||
mitigation_product=["DDOS", "WAF", "BOT_MANAGEMENT"],
|
||||
name=["string", "string", "string"],
|
||||
mitigation_product=["DDOS"],
|
||||
name=["string"],
|
||||
normalization="PERCENTAGE",
|
||||
)
|
||||
assert_matches_type(TopAttacksResponse, top, path=["response"])
|
||||
|
|
@ -250,27 +218,19 @@ class TestAsyncTop:
|
|||
@parametrize
|
||||
async def test_method_industry_with_all_params(self, async_client: AsyncCloudflare) -> None:
|
||||
top = await async_client.radar.attacks.layer7.top.industry(
|
||||
asn=["string", "string", "string"],
|
||||
continent=["string", "string", "string"],
|
||||
date_end=[
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
],
|
||||
date_range=["7d", "7d", "7d"],
|
||||
date_start=[
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
],
|
||||
asn=["string"],
|
||||
continent=["string"],
|
||||
date_end=[parse_datetime("2019-12-27T18:11:19.117Z")],
|
||||
date_range=["7d"],
|
||||
date_start=[parse_datetime("2019-12-27T18:11:19.117Z")],
|
||||
format="JSON",
|
||||
http_method=["GET", "POST", "DELETE"],
|
||||
http_version=["HTTPv1", "HTTPv2", "HTTPv3"],
|
||||
ip_version=["IPv4", "IPv6"],
|
||||
http_method=["GET"],
|
||||
http_version=["HTTPv1"],
|
||||
ip_version=["IPv4"],
|
||||
limit=5,
|
||||
location=["string", "string", "string"],
|
||||
mitigation_product=["DDOS", "WAF", "BOT_MANAGEMENT"],
|
||||
name=["string", "string", "string"],
|
||||
location=["string"],
|
||||
mitigation_product=["DDOS"],
|
||||
name=["string"],
|
||||
)
|
||||
assert_matches_type(TopIndustryResponse, top, path=["response"])
|
||||
|
||||
|
|
@ -302,27 +262,19 @@ class TestAsyncTop:
|
|||
@parametrize
|
||||
async def test_method_vertical_with_all_params(self, async_client: AsyncCloudflare) -> None:
|
||||
top = await async_client.radar.attacks.layer7.top.vertical(
|
||||
asn=["string", "string", "string"],
|
||||
continent=["string", "string", "string"],
|
||||
date_end=[
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
],
|
||||
date_range=["7d", "7d", "7d"],
|
||||
date_start=[
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
],
|
||||
asn=["string"],
|
||||
continent=["string"],
|
||||
date_end=[parse_datetime("2019-12-27T18:11:19.117Z")],
|
||||
date_range=["7d"],
|
||||
date_start=[parse_datetime("2019-12-27T18:11:19.117Z")],
|
||||
format="JSON",
|
||||
http_method=["GET", "POST", "DELETE"],
|
||||
http_version=["HTTPv1", "HTTPv2", "HTTPv3"],
|
||||
ip_version=["IPv4", "IPv6"],
|
||||
http_method=["GET"],
|
||||
http_version=["HTTPv1"],
|
||||
ip_version=["IPv4"],
|
||||
limit=5,
|
||||
location=["string", "string", "string"],
|
||||
mitigation_product=["DDOS", "WAF", "BOT_MANAGEMENT"],
|
||||
name=["string", "string", "string"],
|
||||
location=["string"],
|
||||
mitigation_product=["DDOS"],
|
||||
name=["string"],
|
||||
)
|
||||
assert_matches_type(TopVerticalResponse, top, path=["response"])
|
||||
|
||||
|
|
|
|||
|
|
@ -26,26 +26,18 @@ class TestAses:
|
|||
@parametrize
|
||||
def test_method_origin_with_all_params(self, client: Cloudflare) -> None:
|
||||
ase = client.radar.attacks.layer7.top.ases.origin(
|
||||
continent=["string", "string", "string"],
|
||||
date_end=[
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
],
|
||||
date_range=["7d", "7d", "7d"],
|
||||
date_start=[
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
],
|
||||
continent=["string"],
|
||||
date_end=[parse_datetime("2019-12-27T18:11:19.117Z")],
|
||||
date_range=["7d"],
|
||||
date_start=[parse_datetime("2019-12-27T18:11:19.117Z")],
|
||||
format="JSON",
|
||||
http_method=["GET", "POST", "DELETE"],
|
||||
http_version=["HTTPv1", "HTTPv2", "HTTPv3"],
|
||||
ip_version=["IPv4", "IPv6"],
|
||||
http_method=["GET"],
|
||||
http_version=["HTTPv1"],
|
||||
ip_version=["IPv4"],
|
||||
limit=5,
|
||||
location=["string", "string", "string"],
|
||||
mitigation_product=["DDOS", "WAF", "BOT_MANAGEMENT"],
|
||||
name=["string", "string", "string"],
|
||||
location=["string"],
|
||||
mitigation_product=["DDOS"],
|
||||
name=["string"],
|
||||
)
|
||||
assert_matches_type(AseOriginResponse, ase, path=["response"])
|
||||
|
||||
|
|
@ -81,26 +73,18 @@ class TestAsyncAses:
|
|||
@parametrize
|
||||
async def test_method_origin_with_all_params(self, async_client: AsyncCloudflare) -> None:
|
||||
ase = await async_client.radar.attacks.layer7.top.ases.origin(
|
||||
continent=["string", "string", "string"],
|
||||
date_end=[
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
],
|
||||
date_range=["7d", "7d", "7d"],
|
||||
date_start=[
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
],
|
||||
continent=["string"],
|
||||
date_end=[parse_datetime("2019-12-27T18:11:19.117Z")],
|
||||
date_range=["7d"],
|
||||
date_start=[parse_datetime("2019-12-27T18:11:19.117Z")],
|
||||
format="JSON",
|
||||
http_method=["GET", "POST", "DELETE"],
|
||||
http_version=["HTTPv1", "HTTPv2", "HTTPv3"],
|
||||
ip_version=["IPv4", "IPv6"],
|
||||
http_method=["GET"],
|
||||
http_version=["HTTPv1"],
|
||||
ip_version=["IPv4"],
|
||||
limit=5,
|
||||
location=["string", "string", "string"],
|
||||
mitigation_product=["DDOS", "WAF", "BOT_MANAGEMENT"],
|
||||
name=["string", "string", "string"],
|
||||
location=["string"],
|
||||
mitigation_product=["DDOS"],
|
||||
name=["string"],
|
||||
)
|
||||
assert_matches_type(AseOriginResponse, ase, path=["response"])
|
||||
|
||||
|
|
|
|||
|
|
@ -29,26 +29,18 @@ class TestLocations:
|
|||
@parametrize
|
||||
def test_method_origin_with_all_params(self, client: Cloudflare) -> None:
|
||||
location = client.radar.attacks.layer7.top.locations.origin(
|
||||
asn=["string", "string", "string"],
|
||||
continent=["string", "string", "string"],
|
||||
date_end=[
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
],
|
||||
date_range=["7d", "7d", "7d"],
|
||||
date_start=[
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
],
|
||||
asn=["string"],
|
||||
continent=["string"],
|
||||
date_end=[parse_datetime("2019-12-27T18:11:19.117Z")],
|
||||
date_range=["7d"],
|
||||
date_start=[parse_datetime("2019-12-27T18:11:19.117Z")],
|
||||
format="JSON",
|
||||
http_method=["GET", "POST", "DELETE"],
|
||||
http_version=["HTTPv1", "HTTPv2", "HTTPv3"],
|
||||
ip_version=["IPv4", "IPv6"],
|
||||
http_method=["GET"],
|
||||
http_version=["HTTPv1"],
|
||||
ip_version=["IPv4"],
|
||||
limit=5,
|
||||
mitigation_product=["DDOS", "WAF", "BOT_MANAGEMENT"],
|
||||
name=["string", "string", "string"],
|
||||
mitigation_product=["DDOS"],
|
||||
name=["string"],
|
||||
)
|
||||
assert_matches_type(LocationOriginResponse, location, path=["response"])
|
||||
|
||||
|
|
@ -80,25 +72,17 @@ class TestLocations:
|
|||
@parametrize
|
||||
def test_method_target_with_all_params(self, client: Cloudflare) -> None:
|
||||
location = client.radar.attacks.layer7.top.locations.target(
|
||||
continent=["string", "string", "string"],
|
||||
date_end=[
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
],
|
||||
date_range=["7d", "7d", "7d"],
|
||||
date_start=[
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
],
|
||||
continent=["string"],
|
||||
date_end=[parse_datetime("2019-12-27T18:11:19.117Z")],
|
||||
date_range=["7d"],
|
||||
date_start=[parse_datetime("2019-12-27T18:11:19.117Z")],
|
||||
format="JSON",
|
||||
http_method=["GET", "POST", "DELETE"],
|
||||
http_version=["HTTPv1", "HTTPv2", "HTTPv3"],
|
||||
ip_version=["IPv4", "IPv6"],
|
||||
http_method=["GET"],
|
||||
http_version=["HTTPv1"],
|
||||
ip_version=["IPv4"],
|
||||
limit=5,
|
||||
mitigation_product=["DDOS", "WAF", "BOT_MANAGEMENT"],
|
||||
name=["string", "string", "string"],
|
||||
mitigation_product=["DDOS"],
|
||||
name=["string"],
|
||||
)
|
||||
assert_matches_type(LocationTargetResponse, location, path=["response"])
|
||||
|
||||
|
|
@ -134,26 +118,18 @@ class TestAsyncLocations:
|
|||
@parametrize
|
||||
async def test_method_origin_with_all_params(self, async_client: AsyncCloudflare) -> None:
|
||||
location = await async_client.radar.attacks.layer7.top.locations.origin(
|
||||
asn=["string", "string", "string"],
|
||||
continent=["string", "string", "string"],
|
||||
date_end=[
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
],
|
||||
date_range=["7d", "7d", "7d"],
|
||||
date_start=[
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
],
|
||||
asn=["string"],
|
||||
continent=["string"],
|
||||
date_end=[parse_datetime("2019-12-27T18:11:19.117Z")],
|
||||
date_range=["7d"],
|
||||
date_start=[parse_datetime("2019-12-27T18:11:19.117Z")],
|
||||
format="JSON",
|
||||
http_method=["GET", "POST", "DELETE"],
|
||||
http_version=["HTTPv1", "HTTPv2", "HTTPv3"],
|
||||
ip_version=["IPv4", "IPv6"],
|
||||
http_method=["GET"],
|
||||
http_version=["HTTPv1"],
|
||||
ip_version=["IPv4"],
|
||||
limit=5,
|
||||
mitigation_product=["DDOS", "WAF", "BOT_MANAGEMENT"],
|
||||
name=["string", "string", "string"],
|
||||
mitigation_product=["DDOS"],
|
||||
name=["string"],
|
||||
)
|
||||
assert_matches_type(LocationOriginResponse, location, path=["response"])
|
||||
|
||||
|
|
@ -185,25 +161,17 @@ class TestAsyncLocations:
|
|||
@parametrize
|
||||
async def test_method_target_with_all_params(self, async_client: AsyncCloudflare) -> None:
|
||||
location = await async_client.radar.attacks.layer7.top.locations.target(
|
||||
continent=["string", "string", "string"],
|
||||
date_end=[
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
],
|
||||
date_range=["7d", "7d", "7d"],
|
||||
date_start=[
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
],
|
||||
continent=["string"],
|
||||
date_end=[parse_datetime("2019-12-27T18:11:19.117Z")],
|
||||
date_range=["7d"],
|
||||
date_start=[parse_datetime("2019-12-27T18:11:19.117Z")],
|
||||
format="JSON",
|
||||
http_method=["GET", "POST", "DELETE"],
|
||||
http_version=["HTTPv1", "HTTPv2", "HTTPv3"],
|
||||
ip_version=["IPv4", "IPv6"],
|
||||
http_method=["GET"],
|
||||
http_version=["HTTPv1"],
|
||||
ip_version=["IPv4"],
|
||||
limit=5,
|
||||
mitigation_product=["DDOS", "WAF", "BOT_MANAGEMENT"],
|
||||
name=["string", "string", "string"],
|
||||
mitigation_product=["DDOS"],
|
||||
name=["string"],
|
||||
)
|
||||
assert_matches_type(LocationTargetResponse, location, path=["response"])
|
||||
|
||||
|
|
|
|||
|
|
@ -27,27 +27,19 @@ class TestLayer3:
|
|||
def test_method_timeseries_with_all_params(self, client: Cloudflare) -> None:
|
||||
layer3 = client.radar.attacks.layer3.timeseries(
|
||||
agg_interval="15m",
|
||||
asn=["string", "string", "string"],
|
||||
continent=["string", "string", "string"],
|
||||
date_end=[
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
],
|
||||
date_range=["7d", "7d", "7d"],
|
||||
date_start=[
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
],
|
||||
asn=["string"],
|
||||
continent=["string"],
|
||||
date_end=[parse_datetime("2019-12-27T18:11:19.117Z")],
|
||||
date_range=["7d"],
|
||||
date_start=[parse_datetime("2019-12-27T18:11:19.117Z")],
|
||||
direction="ORIGIN",
|
||||
format="JSON",
|
||||
ip_version=["IPv4", "IPv6"],
|
||||
location=["string", "string", "string"],
|
||||
ip_version=["IPv4"],
|
||||
location=["string"],
|
||||
metric="BYTES",
|
||||
name=["string", "string", "string"],
|
||||
name=["string"],
|
||||
normalization="PERCENTAGE_CHANGE",
|
||||
protocol=["UDP", "TCP", "ICMP"],
|
||||
protocol=["UDP"],
|
||||
)
|
||||
assert_matches_type(Layer3TimeseriesResponse, layer3, path=["response"])
|
||||
|
||||
|
|
@ -84,27 +76,19 @@ class TestAsyncLayer3:
|
|||
async def test_method_timeseries_with_all_params(self, async_client: AsyncCloudflare) -> None:
|
||||
layer3 = await async_client.radar.attacks.layer3.timeseries(
|
||||
agg_interval="15m",
|
||||
asn=["string", "string", "string"],
|
||||
continent=["string", "string", "string"],
|
||||
date_end=[
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
],
|
||||
date_range=["7d", "7d", "7d"],
|
||||
date_start=[
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
],
|
||||
asn=["string"],
|
||||
continent=["string"],
|
||||
date_end=[parse_datetime("2019-12-27T18:11:19.117Z")],
|
||||
date_range=["7d"],
|
||||
date_start=[parse_datetime("2019-12-27T18:11:19.117Z")],
|
||||
direction="ORIGIN",
|
||||
format="JSON",
|
||||
ip_version=["IPv4", "IPv6"],
|
||||
location=["string", "string", "string"],
|
||||
ip_version=["IPv4"],
|
||||
location=["string"],
|
||||
metric="BYTES",
|
||||
name=["string", "string", "string"],
|
||||
name=["string"],
|
||||
normalization="PERCENTAGE_CHANGE",
|
||||
protocol=["UDP", "TCP", "ICMP"],
|
||||
protocol=["UDP"],
|
||||
)
|
||||
assert_matches_type(Layer3TimeseriesResponse, layer3, path=["response"])
|
||||
|
||||
|
|
|
|||
|
|
@ -27,27 +27,19 @@ class TestLayer7:
|
|||
def test_method_timeseries_with_all_params(self, client: Cloudflare) -> None:
|
||||
layer7 = client.radar.attacks.layer7.timeseries(
|
||||
agg_interval="15m",
|
||||
asn=["string", "string", "string"],
|
||||
attack=["DDOS", "WAF", "BOT_MANAGEMENT"],
|
||||
continent=["string", "string", "string"],
|
||||
date_end=[
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
],
|
||||
date_range=["7d", "7d", "7d"],
|
||||
date_start=[
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
],
|
||||
asn=["string"],
|
||||
attack=["DDOS"],
|
||||
continent=["string"],
|
||||
date_end=[parse_datetime("2019-12-27T18:11:19.117Z")],
|
||||
date_range=["7d"],
|
||||
date_start=[parse_datetime("2019-12-27T18:11:19.117Z")],
|
||||
format="JSON",
|
||||
http_method=["GET", "POST", "DELETE"],
|
||||
http_version=["HTTPv1", "HTTPv2", "HTTPv3"],
|
||||
ip_version=["IPv4", "IPv6"],
|
||||
location=["string", "string", "string"],
|
||||
mitigation_product=["DDOS", "WAF", "BOT_MANAGEMENT"],
|
||||
name=["string", "string", "string"],
|
||||
http_method=["GET"],
|
||||
http_version=["HTTPv1"],
|
||||
ip_version=["IPv4"],
|
||||
location=["string"],
|
||||
mitigation_product=["DDOS"],
|
||||
name=["string"],
|
||||
normalization="PERCENTAGE_CHANGE",
|
||||
)
|
||||
assert_matches_type(Layer7TimeseriesResponse, layer7, path=["response"])
|
||||
|
|
@ -85,27 +77,19 @@ class TestAsyncLayer7:
|
|||
async def test_method_timeseries_with_all_params(self, async_client: AsyncCloudflare) -> None:
|
||||
layer7 = await async_client.radar.attacks.layer7.timeseries(
|
||||
agg_interval="15m",
|
||||
asn=["string", "string", "string"],
|
||||
attack=["DDOS", "WAF", "BOT_MANAGEMENT"],
|
||||
continent=["string", "string", "string"],
|
||||
date_end=[
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
],
|
||||
date_range=["7d", "7d", "7d"],
|
||||
date_start=[
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
],
|
||||
asn=["string"],
|
||||
attack=["DDOS"],
|
||||
continent=["string"],
|
||||
date_end=[parse_datetime("2019-12-27T18:11:19.117Z")],
|
||||
date_range=["7d"],
|
||||
date_start=[parse_datetime("2019-12-27T18:11:19.117Z")],
|
||||
format="JSON",
|
||||
http_method=["GET", "POST", "DELETE"],
|
||||
http_version=["HTTPv1", "HTTPv2", "HTTPv3"],
|
||||
ip_version=["IPv4", "IPv6"],
|
||||
location=["string", "string", "string"],
|
||||
mitigation_product=["DDOS", "WAF", "BOT_MANAGEMENT"],
|
||||
name=["string", "string", "string"],
|
||||
http_method=["GET"],
|
||||
http_version=["HTTPv1"],
|
||||
ip_version=["IPv4"],
|
||||
location=["string"],
|
||||
mitigation_product=["DDOS"],
|
||||
name=["string"],
|
||||
normalization="PERCENTAGE_CHANGE",
|
||||
)
|
||||
assert_matches_type(Layer7TimeseriesResponse, layer7, path=["response"])
|
||||
|
|
|
|||
|
|
@ -26,23 +26,15 @@ class TestIPs:
|
|||
@parametrize
|
||||
def test_method_timeseries_with_all_params(self, client: Cloudflare) -> None:
|
||||
ip = client.radar.bgp.ips.timeseries(
|
||||
asn=["string", "string", "string"],
|
||||
date_end=[
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
],
|
||||
date_range=["7d", "7d", "7d"],
|
||||
date_start=[
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
],
|
||||
asn=["string"],
|
||||
date_end=[parse_datetime("2019-12-27T18:11:19.117Z")],
|
||||
date_range=["7d"],
|
||||
date_start=[parse_datetime("2019-12-27T18:11:19.117Z")],
|
||||
format="JSON",
|
||||
include_delay=True,
|
||||
ip_version=["IPv4", "IPv6"],
|
||||
location=["string", "string", "string"],
|
||||
name=["string", "string", "string"],
|
||||
ip_version=["IPv4"],
|
||||
location=["string"],
|
||||
name=["string"],
|
||||
)
|
||||
assert_matches_type(IPTimeseriesResponse, ip, path=["response"])
|
||||
|
||||
|
|
@ -78,23 +70,15 @@ class TestAsyncIPs:
|
|||
@parametrize
|
||||
async def test_method_timeseries_with_all_params(self, async_client: AsyncCloudflare) -> None:
|
||||
ip = await async_client.radar.bgp.ips.timeseries(
|
||||
asn=["string", "string", "string"],
|
||||
date_end=[
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
],
|
||||
date_range=["7d", "7d", "7d"],
|
||||
date_start=[
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
],
|
||||
asn=["string"],
|
||||
date_end=[parse_datetime("2019-12-27T18:11:19.117Z")],
|
||||
date_range=["7d"],
|
||||
date_start=[parse_datetime("2019-12-27T18:11:19.117Z")],
|
||||
format="JSON",
|
||||
include_delay=True,
|
||||
ip_version=["IPv4", "IPv6"],
|
||||
location=["string", "string", "string"],
|
||||
name=["string", "string", "string"],
|
||||
ip_version=["IPv4"],
|
||||
location=["string"],
|
||||
name=["string"],
|
||||
)
|
||||
assert_matches_type(IPTimeseriesResponse, ip, path=["response"])
|
||||
|
||||
|
|
|
|||
|
|
@ -26,22 +26,14 @@ class TestTop:
|
|||
@parametrize
|
||||
def test_method_prefixes_with_all_params(self, client: Cloudflare) -> None:
|
||||
top = client.radar.bgp.top.prefixes(
|
||||
asn=["string", "string", "string"],
|
||||
date_end=[
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
],
|
||||
date_range=["7d", "7d", "7d"],
|
||||
date_start=[
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
],
|
||||
asn=["string"],
|
||||
date_end=[parse_datetime("2019-12-27T18:11:19.117Z")],
|
||||
date_range=["7d"],
|
||||
date_start=[parse_datetime("2019-12-27T18:11:19.117Z")],
|
||||
format="JSON",
|
||||
limit=5,
|
||||
name=["string", "string", "string"],
|
||||
update_type=["ANNOUNCEMENT", "WITHDRAWAL"],
|
||||
name=["string"],
|
||||
update_type=["ANNOUNCEMENT"],
|
||||
)
|
||||
assert_matches_type(TopPrefixesResponse, top, path=["response"])
|
||||
|
||||
|
|
@ -77,22 +69,14 @@ class TestAsyncTop:
|
|||
@parametrize
|
||||
async def test_method_prefixes_with_all_params(self, async_client: AsyncCloudflare) -> None:
|
||||
top = await async_client.radar.bgp.top.prefixes(
|
||||
asn=["string", "string", "string"],
|
||||
date_end=[
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
],
|
||||
date_range=["7d", "7d", "7d"],
|
||||
date_start=[
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
],
|
||||
asn=["string"],
|
||||
date_end=[parse_datetime("2019-12-27T18:11:19.117Z")],
|
||||
date_range=["7d"],
|
||||
date_start=[parse_datetime("2019-12-27T18:11:19.117Z")],
|
||||
format="JSON",
|
||||
limit=5,
|
||||
name=["string", "string", "string"],
|
||||
update_type=["ANNOUNCEMENT", "WITHDRAWAL"],
|
||||
name=["string"],
|
||||
update_type=["ANNOUNCEMENT"],
|
||||
)
|
||||
assert_matches_type(TopPrefixesResponse, top, path=["response"])
|
||||
|
||||
|
|
|
|||
|
|
@ -26,23 +26,15 @@ class TestAses:
|
|||
@parametrize
|
||||
def test_method_get_with_all_params(self, client: Cloudflare) -> None:
|
||||
ase = client.radar.bgp.top.ases.get(
|
||||
asn=["string", "string", "string"],
|
||||
date_end=[
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
],
|
||||
date_range=["7d", "7d", "7d"],
|
||||
date_start=[
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
],
|
||||
asn=["string"],
|
||||
date_end=[parse_datetime("2019-12-27T18:11:19.117Z")],
|
||||
date_range=["7d"],
|
||||
date_start=[parse_datetime("2019-12-27T18:11:19.117Z")],
|
||||
format="JSON",
|
||||
limit=5,
|
||||
name=["string", "string", "string"],
|
||||
prefix=["1.1.1.0/24", "1.1.1.0/24", "1.1.1.0/24"],
|
||||
update_type=["ANNOUNCEMENT", "WITHDRAWAL"],
|
||||
name=["string"],
|
||||
prefix=["1.1.1.0/24"],
|
||||
update_type=["ANNOUNCEMENT"],
|
||||
)
|
||||
assert_matches_type(AseGetResponse, ase, path=["response"])
|
||||
|
||||
|
|
@ -112,23 +104,15 @@ class TestAsyncAses:
|
|||
@parametrize
|
||||
async def test_method_get_with_all_params(self, async_client: AsyncCloudflare) -> None:
|
||||
ase = await async_client.radar.bgp.top.ases.get(
|
||||
asn=["string", "string", "string"],
|
||||
date_end=[
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
],
|
||||
date_range=["7d", "7d", "7d"],
|
||||
date_start=[
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
],
|
||||
asn=["string"],
|
||||
date_end=[parse_datetime("2019-12-27T18:11:19.117Z")],
|
||||
date_range=["7d"],
|
||||
date_start=[parse_datetime("2019-12-27T18:11:19.117Z")],
|
||||
format="JSON",
|
||||
limit=5,
|
||||
name=["string", "string", "string"],
|
||||
prefix=["1.1.1.0/24", "1.1.1.0/24", "1.1.1.0/24"],
|
||||
update_type=["ANNOUNCEMENT", "WITHDRAWAL"],
|
||||
name=["string"],
|
||||
prefix=["1.1.1.0/24"],
|
||||
update_type=["ANNOUNCEMENT"],
|
||||
)
|
||||
assert_matches_type(AseGetResponse, ase, path=["response"])
|
||||
|
||||
|
|
|
|||
|
|
@ -21,38 +21,30 @@ class TestTop:
|
|||
@parametrize
|
||||
def test_method_ases(self, client: Cloudflare) -> None:
|
||||
top = client.radar.dns.top.ases(
|
||||
domain=["string", "string", "string"],
|
||||
domain=["string"],
|
||||
)
|
||||
assert_matches_type(TopAsesResponse, top, path=["response"])
|
||||
|
||||
@parametrize
|
||||
def test_method_ases_with_all_params(self, client: Cloudflare) -> None:
|
||||
top = client.radar.dns.top.ases(
|
||||
domain=["string", "string", "string"],
|
||||
asn=["string", "string", "string"],
|
||||
continent=["string", "string", "string"],
|
||||
date_end=[
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
],
|
||||
date_range=["7d", "7d", "7d"],
|
||||
date_start=[
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
],
|
||||
domain=["string"],
|
||||
asn=["string"],
|
||||
continent=["string"],
|
||||
date_end=[parse_datetime("2019-12-27T18:11:19.117Z")],
|
||||
date_range=["7d"],
|
||||
date_start=[parse_datetime("2019-12-27T18:11:19.117Z")],
|
||||
format="JSON",
|
||||
limit=5,
|
||||
location=["string", "string", "string"],
|
||||
name=["string", "string", "string"],
|
||||
location=["string"],
|
||||
name=["string"],
|
||||
)
|
||||
assert_matches_type(TopAsesResponse, top, path=["response"])
|
||||
|
||||
@parametrize
|
||||
def test_raw_response_ases(self, client: Cloudflare) -> None:
|
||||
response = client.radar.dns.top.with_raw_response.ases(
|
||||
domain=["string", "string", "string"],
|
||||
domain=["string"],
|
||||
)
|
||||
|
||||
assert response.is_closed is True
|
||||
|
|
@ -63,7 +55,7 @@ class TestTop:
|
|||
@parametrize
|
||||
def test_streaming_response_ases(self, client: Cloudflare) -> None:
|
||||
with client.radar.dns.top.with_streaming_response.ases(
|
||||
domain=["string", "string", "string"],
|
||||
domain=["string"],
|
||||
) as response:
|
||||
assert not response.is_closed
|
||||
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
|
||||
|
|
@ -76,38 +68,30 @@ class TestTop:
|
|||
@parametrize
|
||||
def test_method_locations(self, client: Cloudflare) -> None:
|
||||
top = client.radar.dns.top.locations(
|
||||
domain=["string", "string", "string"],
|
||||
domain=["string"],
|
||||
)
|
||||
assert_matches_type(TopLocationsResponse, top, path=["response"])
|
||||
|
||||
@parametrize
|
||||
def test_method_locations_with_all_params(self, client: Cloudflare) -> None:
|
||||
top = client.radar.dns.top.locations(
|
||||
domain=["string", "string", "string"],
|
||||
asn=["string", "string", "string"],
|
||||
continent=["string", "string", "string"],
|
||||
date_end=[
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
],
|
||||
date_range=["7d", "7d", "7d"],
|
||||
date_start=[
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
],
|
||||
domain=["string"],
|
||||
asn=["string"],
|
||||
continent=["string"],
|
||||
date_end=[parse_datetime("2019-12-27T18:11:19.117Z")],
|
||||
date_range=["7d"],
|
||||
date_start=[parse_datetime("2019-12-27T18:11:19.117Z")],
|
||||
format="JSON",
|
||||
limit=5,
|
||||
location=["string", "string", "string"],
|
||||
name=["string", "string", "string"],
|
||||
location=["string"],
|
||||
name=["string"],
|
||||
)
|
||||
assert_matches_type(TopLocationsResponse, top, path=["response"])
|
||||
|
||||
@parametrize
|
||||
def test_raw_response_locations(self, client: Cloudflare) -> None:
|
||||
response = client.radar.dns.top.with_raw_response.locations(
|
||||
domain=["string", "string", "string"],
|
||||
domain=["string"],
|
||||
)
|
||||
|
||||
assert response.is_closed is True
|
||||
|
|
@ -118,7 +102,7 @@ class TestTop:
|
|||
@parametrize
|
||||
def test_streaming_response_locations(self, client: Cloudflare) -> None:
|
||||
with client.radar.dns.top.with_streaming_response.locations(
|
||||
domain=["string", "string", "string"],
|
||||
domain=["string"],
|
||||
) as response:
|
||||
assert not response.is_closed
|
||||
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
|
||||
|
|
@ -135,38 +119,30 @@ class TestAsyncTop:
|
|||
@parametrize
|
||||
async def test_method_ases(self, async_client: AsyncCloudflare) -> None:
|
||||
top = await async_client.radar.dns.top.ases(
|
||||
domain=["string", "string", "string"],
|
||||
domain=["string"],
|
||||
)
|
||||
assert_matches_type(TopAsesResponse, top, path=["response"])
|
||||
|
||||
@parametrize
|
||||
async def test_method_ases_with_all_params(self, async_client: AsyncCloudflare) -> None:
|
||||
top = await async_client.radar.dns.top.ases(
|
||||
domain=["string", "string", "string"],
|
||||
asn=["string", "string", "string"],
|
||||
continent=["string", "string", "string"],
|
||||
date_end=[
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
],
|
||||
date_range=["7d", "7d", "7d"],
|
||||
date_start=[
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
],
|
||||
domain=["string"],
|
||||
asn=["string"],
|
||||
continent=["string"],
|
||||
date_end=[parse_datetime("2019-12-27T18:11:19.117Z")],
|
||||
date_range=["7d"],
|
||||
date_start=[parse_datetime("2019-12-27T18:11:19.117Z")],
|
||||
format="JSON",
|
||||
limit=5,
|
||||
location=["string", "string", "string"],
|
||||
name=["string", "string", "string"],
|
||||
location=["string"],
|
||||
name=["string"],
|
||||
)
|
||||
assert_matches_type(TopAsesResponse, top, path=["response"])
|
||||
|
||||
@parametrize
|
||||
async def test_raw_response_ases(self, async_client: AsyncCloudflare) -> None:
|
||||
response = await async_client.radar.dns.top.with_raw_response.ases(
|
||||
domain=["string", "string", "string"],
|
||||
domain=["string"],
|
||||
)
|
||||
|
||||
assert response.is_closed is True
|
||||
|
|
@ -177,7 +153,7 @@ class TestAsyncTop:
|
|||
@parametrize
|
||||
async def test_streaming_response_ases(self, async_client: AsyncCloudflare) -> None:
|
||||
async with async_client.radar.dns.top.with_streaming_response.ases(
|
||||
domain=["string", "string", "string"],
|
||||
domain=["string"],
|
||||
) as response:
|
||||
assert not response.is_closed
|
||||
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
|
||||
|
|
@ -190,38 +166,30 @@ class TestAsyncTop:
|
|||
@parametrize
|
||||
async def test_method_locations(self, async_client: AsyncCloudflare) -> None:
|
||||
top = await async_client.radar.dns.top.locations(
|
||||
domain=["string", "string", "string"],
|
||||
domain=["string"],
|
||||
)
|
||||
assert_matches_type(TopLocationsResponse, top, path=["response"])
|
||||
|
||||
@parametrize
|
||||
async def test_method_locations_with_all_params(self, async_client: AsyncCloudflare) -> None:
|
||||
top = await async_client.radar.dns.top.locations(
|
||||
domain=["string", "string", "string"],
|
||||
asn=["string", "string", "string"],
|
||||
continent=["string", "string", "string"],
|
||||
date_end=[
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
],
|
||||
date_range=["7d", "7d", "7d"],
|
||||
date_start=[
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
],
|
||||
domain=["string"],
|
||||
asn=["string"],
|
||||
continent=["string"],
|
||||
date_end=[parse_datetime("2019-12-27T18:11:19.117Z")],
|
||||
date_range=["7d"],
|
||||
date_start=[parse_datetime("2019-12-27T18:11:19.117Z")],
|
||||
format="JSON",
|
||||
limit=5,
|
||||
location=["string", "string", "string"],
|
||||
name=["string", "string", "string"],
|
||||
location=["string"],
|
||||
name=["string"],
|
||||
)
|
||||
assert_matches_type(TopLocationsResponse, top, path=["response"])
|
||||
|
||||
@parametrize
|
||||
async def test_raw_response_locations(self, async_client: AsyncCloudflare) -> None:
|
||||
response = await async_client.radar.dns.top.with_raw_response.locations(
|
||||
domain=["string", "string", "string"],
|
||||
domain=["string"],
|
||||
)
|
||||
|
||||
assert response.is_closed is True
|
||||
|
|
@ -232,7 +200,7 @@ class TestAsyncTop:
|
|||
@parametrize
|
||||
async def test_streaming_response_locations(self, async_client: AsyncCloudflare) -> None:
|
||||
async with async_client.radar.dns.top.with_streaming_response.locations(
|
||||
domain=["string", "string", "string"],
|
||||
domain=["string"],
|
||||
) as response:
|
||||
assert not response.is_closed
|
||||
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
|
||||
|
|
|
|||
|
|
@ -33,24 +33,16 @@ class TestSummary:
|
|||
@parametrize
|
||||
def test_method_arc_with_all_params(self, client: Cloudflare) -> None:
|
||||
summary = client.radar.email.routing.summary.arc(
|
||||
date_end=[
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
],
|
||||
date_range=["7d", "7d", "7d"],
|
||||
date_start=[
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
],
|
||||
dkim=["PASS", "NONE", "FAIL"],
|
||||
dmarc=["PASS", "NONE", "FAIL"],
|
||||
encrypted=["ENCRYPTED", "NOT_ENCRYPTED"],
|
||||
date_end=[parse_datetime("2019-12-27T18:11:19.117Z")],
|
||||
date_range=["7d"],
|
||||
date_start=[parse_datetime("2019-12-27T18:11:19.117Z")],
|
||||
dkim=["PASS"],
|
||||
dmarc=["PASS"],
|
||||
encrypted=["ENCRYPTED"],
|
||||
format="JSON",
|
||||
ip_version=["IPv4", "IPv6"],
|
||||
name=["string", "string", "string"],
|
||||
spf=["PASS", "NONE", "FAIL"],
|
||||
ip_version=["IPv4"],
|
||||
name=["string"],
|
||||
spf=["PASS"],
|
||||
)
|
||||
assert_matches_type(SummaryARCResponse, summary, path=["response"])
|
||||
|
||||
|
|
@ -82,24 +74,16 @@ class TestSummary:
|
|||
@parametrize
|
||||
def test_method_dkim_with_all_params(self, client: Cloudflare) -> None:
|
||||
summary = client.radar.email.routing.summary.dkim(
|
||||
arc=["PASS", "NONE", "FAIL"],
|
||||
date_end=[
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
],
|
||||
date_range=["7d", "7d", "7d"],
|
||||
date_start=[
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
],
|
||||
dmarc=["PASS", "NONE", "FAIL"],
|
||||
encrypted=["ENCRYPTED", "NOT_ENCRYPTED"],
|
||||
arc=["PASS"],
|
||||
date_end=[parse_datetime("2019-12-27T18:11:19.117Z")],
|
||||
date_range=["7d"],
|
||||
date_start=[parse_datetime("2019-12-27T18:11:19.117Z")],
|
||||
dmarc=["PASS"],
|
||||
encrypted=["ENCRYPTED"],
|
||||
format="JSON",
|
||||
ip_version=["IPv4", "IPv6"],
|
||||
name=["string", "string", "string"],
|
||||
spf=["PASS", "NONE", "FAIL"],
|
||||
ip_version=["IPv4"],
|
||||
name=["string"],
|
||||
spf=["PASS"],
|
||||
)
|
||||
assert_matches_type(SummaryDKIMResponse, summary, path=["response"])
|
||||
|
||||
|
|
@ -131,24 +115,16 @@ class TestSummary:
|
|||
@parametrize
|
||||
def test_method_dmarc_with_all_params(self, client: Cloudflare) -> None:
|
||||
summary = client.radar.email.routing.summary.dmarc(
|
||||
arc=["PASS", "NONE", "FAIL"],
|
||||
date_end=[
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
],
|
||||
date_range=["7d", "7d", "7d"],
|
||||
date_start=[
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
],
|
||||
dkim=["PASS", "NONE", "FAIL"],
|
||||
encrypted=["ENCRYPTED", "NOT_ENCRYPTED"],
|
||||
arc=["PASS"],
|
||||
date_end=[parse_datetime("2019-12-27T18:11:19.117Z")],
|
||||
date_range=["7d"],
|
||||
date_start=[parse_datetime("2019-12-27T18:11:19.117Z")],
|
||||
dkim=["PASS"],
|
||||
encrypted=["ENCRYPTED"],
|
||||
format="JSON",
|
||||
ip_version=["IPv4", "IPv6"],
|
||||
name=["string", "string", "string"],
|
||||
spf=["PASS", "NONE", "FAIL"],
|
||||
ip_version=["IPv4"],
|
||||
name=["string"],
|
||||
spf=["PASS"],
|
||||
)
|
||||
assert_matches_type(SummaryDMARCResponse, summary, path=["response"])
|
||||
|
||||
|
|
@ -180,24 +156,16 @@ class TestSummary:
|
|||
@parametrize
|
||||
def test_method_encrypted_with_all_params(self, client: Cloudflare) -> None:
|
||||
summary = client.radar.email.routing.summary.encrypted(
|
||||
arc=["PASS", "NONE", "FAIL"],
|
||||
date_end=[
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
],
|
||||
date_range=["7d", "7d", "7d"],
|
||||
date_start=[
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
],
|
||||
dkim=["PASS", "NONE", "FAIL"],
|
||||
dmarc=["PASS", "NONE", "FAIL"],
|
||||
arc=["PASS"],
|
||||
date_end=[parse_datetime("2019-12-27T18:11:19.117Z")],
|
||||
date_range=["7d"],
|
||||
date_start=[parse_datetime("2019-12-27T18:11:19.117Z")],
|
||||
dkim=["PASS"],
|
||||
dmarc=["PASS"],
|
||||
format="JSON",
|
||||
ip_version=["IPv4", "IPv6"],
|
||||
name=["string", "string", "string"],
|
||||
spf=["PASS", "NONE", "FAIL"],
|
||||
ip_version=["IPv4"],
|
||||
name=["string"],
|
||||
spf=["PASS"],
|
||||
)
|
||||
assert_matches_type(SummaryEncryptedResponse, summary, path=["response"])
|
||||
|
||||
|
|
@ -229,24 +197,16 @@ class TestSummary:
|
|||
@parametrize
|
||||
def test_method_ip_version_with_all_params(self, client: Cloudflare) -> None:
|
||||
summary = client.radar.email.routing.summary.ip_version(
|
||||
arc=["PASS", "NONE", "FAIL"],
|
||||
date_end=[
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
],
|
||||
date_range=["7d", "7d", "7d"],
|
||||
date_start=[
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
],
|
||||
dkim=["PASS", "NONE", "FAIL"],
|
||||
dmarc=["PASS", "NONE", "FAIL"],
|
||||
encrypted=["ENCRYPTED", "NOT_ENCRYPTED"],
|
||||
arc=["PASS"],
|
||||
date_end=[parse_datetime("2019-12-27T18:11:19.117Z")],
|
||||
date_range=["7d"],
|
||||
date_start=[parse_datetime("2019-12-27T18:11:19.117Z")],
|
||||
dkim=["PASS"],
|
||||
dmarc=["PASS"],
|
||||
encrypted=["ENCRYPTED"],
|
||||
format="JSON",
|
||||
name=["string", "string", "string"],
|
||||
spf=["PASS", "NONE", "FAIL"],
|
||||
name=["string"],
|
||||
spf=["PASS"],
|
||||
)
|
||||
assert_matches_type(SummaryIPVersionResponse, summary, path=["response"])
|
||||
|
||||
|
|
@ -278,24 +238,16 @@ class TestSummary:
|
|||
@parametrize
|
||||
def test_method_spf_with_all_params(self, client: Cloudflare) -> None:
|
||||
summary = client.radar.email.routing.summary.spf(
|
||||
arc=["PASS", "NONE", "FAIL"],
|
||||
date_end=[
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
],
|
||||
date_range=["7d", "7d", "7d"],
|
||||
date_start=[
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
],
|
||||
dkim=["PASS", "NONE", "FAIL"],
|
||||
dmarc=["PASS", "NONE", "FAIL"],
|
||||
encrypted=["ENCRYPTED", "NOT_ENCRYPTED"],
|
||||
arc=["PASS"],
|
||||
date_end=[parse_datetime("2019-12-27T18:11:19.117Z")],
|
||||
date_range=["7d"],
|
||||
date_start=[parse_datetime("2019-12-27T18:11:19.117Z")],
|
||||
dkim=["PASS"],
|
||||
dmarc=["PASS"],
|
||||
encrypted=["ENCRYPTED"],
|
||||
format="JSON",
|
||||
ip_version=["IPv4", "IPv6"],
|
||||
name=["string", "string", "string"],
|
||||
ip_version=["IPv4"],
|
||||
name=["string"],
|
||||
)
|
||||
assert_matches_type(SummarySPFResponse, summary, path=["response"])
|
||||
|
||||
|
|
@ -331,24 +283,16 @@ class TestAsyncSummary:
|
|||
@parametrize
|
||||
async def test_method_arc_with_all_params(self, async_client: AsyncCloudflare) -> None:
|
||||
summary = await async_client.radar.email.routing.summary.arc(
|
||||
date_end=[
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
],
|
||||
date_range=["7d", "7d", "7d"],
|
||||
date_start=[
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
],
|
||||
dkim=["PASS", "NONE", "FAIL"],
|
||||
dmarc=["PASS", "NONE", "FAIL"],
|
||||
encrypted=["ENCRYPTED", "NOT_ENCRYPTED"],
|
||||
date_end=[parse_datetime("2019-12-27T18:11:19.117Z")],
|
||||
date_range=["7d"],
|
||||
date_start=[parse_datetime("2019-12-27T18:11:19.117Z")],
|
||||
dkim=["PASS"],
|
||||
dmarc=["PASS"],
|
||||
encrypted=["ENCRYPTED"],
|
||||
format="JSON",
|
||||
ip_version=["IPv4", "IPv6"],
|
||||
name=["string", "string", "string"],
|
||||
spf=["PASS", "NONE", "FAIL"],
|
||||
ip_version=["IPv4"],
|
||||
name=["string"],
|
||||
spf=["PASS"],
|
||||
)
|
||||
assert_matches_type(SummaryARCResponse, summary, path=["response"])
|
||||
|
||||
|
|
@ -380,24 +324,16 @@ class TestAsyncSummary:
|
|||
@parametrize
|
||||
async def test_method_dkim_with_all_params(self, async_client: AsyncCloudflare) -> None:
|
||||
summary = await async_client.radar.email.routing.summary.dkim(
|
||||
arc=["PASS", "NONE", "FAIL"],
|
||||
date_end=[
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
],
|
||||
date_range=["7d", "7d", "7d"],
|
||||
date_start=[
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
],
|
||||
dmarc=["PASS", "NONE", "FAIL"],
|
||||
encrypted=["ENCRYPTED", "NOT_ENCRYPTED"],
|
||||
arc=["PASS"],
|
||||
date_end=[parse_datetime("2019-12-27T18:11:19.117Z")],
|
||||
date_range=["7d"],
|
||||
date_start=[parse_datetime("2019-12-27T18:11:19.117Z")],
|
||||
dmarc=["PASS"],
|
||||
encrypted=["ENCRYPTED"],
|
||||
format="JSON",
|
||||
ip_version=["IPv4", "IPv6"],
|
||||
name=["string", "string", "string"],
|
||||
spf=["PASS", "NONE", "FAIL"],
|
||||
ip_version=["IPv4"],
|
||||
name=["string"],
|
||||
spf=["PASS"],
|
||||
)
|
||||
assert_matches_type(SummaryDKIMResponse, summary, path=["response"])
|
||||
|
||||
|
|
@ -429,24 +365,16 @@ class TestAsyncSummary:
|
|||
@parametrize
|
||||
async def test_method_dmarc_with_all_params(self, async_client: AsyncCloudflare) -> None:
|
||||
summary = await async_client.radar.email.routing.summary.dmarc(
|
||||
arc=["PASS", "NONE", "FAIL"],
|
||||
date_end=[
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
],
|
||||
date_range=["7d", "7d", "7d"],
|
||||
date_start=[
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
],
|
||||
dkim=["PASS", "NONE", "FAIL"],
|
||||
encrypted=["ENCRYPTED", "NOT_ENCRYPTED"],
|
||||
arc=["PASS"],
|
||||
date_end=[parse_datetime("2019-12-27T18:11:19.117Z")],
|
||||
date_range=["7d"],
|
||||
date_start=[parse_datetime("2019-12-27T18:11:19.117Z")],
|
||||
dkim=["PASS"],
|
||||
encrypted=["ENCRYPTED"],
|
||||
format="JSON",
|
||||
ip_version=["IPv4", "IPv6"],
|
||||
name=["string", "string", "string"],
|
||||
spf=["PASS", "NONE", "FAIL"],
|
||||
ip_version=["IPv4"],
|
||||
name=["string"],
|
||||
spf=["PASS"],
|
||||
)
|
||||
assert_matches_type(SummaryDMARCResponse, summary, path=["response"])
|
||||
|
||||
|
|
@ -478,24 +406,16 @@ class TestAsyncSummary:
|
|||
@parametrize
|
||||
async def test_method_encrypted_with_all_params(self, async_client: AsyncCloudflare) -> None:
|
||||
summary = await async_client.radar.email.routing.summary.encrypted(
|
||||
arc=["PASS", "NONE", "FAIL"],
|
||||
date_end=[
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
],
|
||||
date_range=["7d", "7d", "7d"],
|
||||
date_start=[
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
],
|
||||
dkim=["PASS", "NONE", "FAIL"],
|
||||
dmarc=["PASS", "NONE", "FAIL"],
|
||||
arc=["PASS"],
|
||||
date_end=[parse_datetime("2019-12-27T18:11:19.117Z")],
|
||||
date_range=["7d"],
|
||||
date_start=[parse_datetime("2019-12-27T18:11:19.117Z")],
|
||||
dkim=["PASS"],
|
||||
dmarc=["PASS"],
|
||||
format="JSON",
|
||||
ip_version=["IPv4", "IPv6"],
|
||||
name=["string", "string", "string"],
|
||||
spf=["PASS", "NONE", "FAIL"],
|
||||
ip_version=["IPv4"],
|
||||
name=["string"],
|
||||
spf=["PASS"],
|
||||
)
|
||||
assert_matches_type(SummaryEncryptedResponse, summary, path=["response"])
|
||||
|
||||
|
|
@ -527,24 +447,16 @@ class TestAsyncSummary:
|
|||
@parametrize
|
||||
async def test_method_ip_version_with_all_params(self, async_client: AsyncCloudflare) -> None:
|
||||
summary = await async_client.radar.email.routing.summary.ip_version(
|
||||
arc=["PASS", "NONE", "FAIL"],
|
||||
date_end=[
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
],
|
||||
date_range=["7d", "7d", "7d"],
|
||||
date_start=[
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
],
|
||||
dkim=["PASS", "NONE", "FAIL"],
|
||||
dmarc=["PASS", "NONE", "FAIL"],
|
||||
encrypted=["ENCRYPTED", "NOT_ENCRYPTED"],
|
||||
arc=["PASS"],
|
||||
date_end=[parse_datetime("2019-12-27T18:11:19.117Z")],
|
||||
date_range=["7d"],
|
||||
date_start=[parse_datetime("2019-12-27T18:11:19.117Z")],
|
||||
dkim=["PASS"],
|
||||
dmarc=["PASS"],
|
||||
encrypted=["ENCRYPTED"],
|
||||
format="JSON",
|
||||
name=["string", "string", "string"],
|
||||
spf=["PASS", "NONE", "FAIL"],
|
||||
name=["string"],
|
||||
spf=["PASS"],
|
||||
)
|
||||
assert_matches_type(SummaryIPVersionResponse, summary, path=["response"])
|
||||
|
||||
|
|
@ -576,24 +488,16 @@ class TestAsyncSummary:
|
|||
@parametrize
|
||||
async def test_method_spf_with_all_params(self, async_client: AsyncCloudflare) -> None:
|
||||
summary = await async_client.radar.email.routing.summary.spf(
|
||||
arc=["PASS", "NONE", "FAIL"],
|
||||
date_end=[
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
],
|
||||
date_range=["7d", "7d", "7d"],
|
||||
date_start=[
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
],
|
||||
dkim=["PASS", "NONE", "FAIL"],
|
||||
dmarc=["PASS", "NONE", "FAIL"],
|
||||
encrypted=["ENCRYPTED", "NOT_ENCRYPTED"],
|
||||
arc=["PASS"],
|
||||
date_end=[parse_datetime("2019-12-27T18:11:19.117Z")],
|
||||
date_range=["7d"],
|
||||
date_start=[parse_datetime("2019-12-27T18:11:19.117Z")],
|
||||
dkim=["PASS"],
|
||||
dmarc=["PASS"],
|
||||
encrypted=["ENCRYPTED"],
|
||||
format="JSON",
|
||||
ip_version=["IPv4", "IPv6"],
|
||||
name=["string", "string", "string"],
|
||||
ip_version=["IPv4"],
|
||||
name=["string"],
|
||||
)
|
||||
assert_matches_type(SummarySPFResponse, summary, path=["response"])
|
||||
|
||||
|
|
|
|||
|
|
@ -34,24 +34,16 @@ class TestTimeseriesGroups:
|
|||
def test_method_arc_with_all_params(self, client: Cloudflare) -> None:
|
||||
timeseries_group = client.radar.email.routing.timeseries_groups.arc(
|
||||
agg_interval="15m",
|
||||
date_end=[
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
],
|
||||
date_range=["7d", "7d", "7d"],
|
||||
date_start=[
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
],
|
||||
dkim=["PASS", "NONE", "FAIL"],
|
||||
dmarc=["PASS", "NONE", "FAIL"],
|
||||
encrypted=["ENCRYPTED", "NOT_ENCRYPTED"],
|
||||
date_end=[parse_datetime("2019-12-27T18:11:19.117Z")],
|
||||
date_range=["7d"],
|
||||
date_start=[parse_datetime("2019-12-27T18:11:19.117Z")],
|
||||
dkim=["PASS"],
|
||||
dmarc=["PASS"],
|
||||
encrypted=["ENCRYPTED"],
|
||||
format="JSON",
|
||||
ip_version=["IPv4", "IPv6"],
|
||||
name=["string", "string", "string"],
|
||||
spf=["PASS", "NONE", "FAIL"],
|
||||
ip_version=["IPv4"],
|
||||
name=["string"],
|
||||
spf=["PASS"],
|
||||
)
|
||||
assert_matches_type(TimeseriesGroupARCResponse, timeseries_group, path=["response"])
|
||||
|
||||
|
|
@ -84,24 +76,16 @@ class TestTimeseriesGroups:
|
|||
def test_method_dkim_with_all_params(self, client: Cloudflare) -> None:
|
||||
timeseries_group = client.radar.email.routing.timeseries_groups.dkim(
|
||||
agg_interval="15m",
|
||||
arc=["PASS", "NONE", "FAIL"],
|
||||
date_end=[
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
],
|
||||
date_range=["7d", "7d", "7d"],
|
||||
date_start=[
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
],
|
||||
dmarc=["PASS", "NONE", "FAIL"],
|
||||
encrypted=["ENCRYPTED", "NOT_ENCRYPTED"],
|
||||
arc=["PASS"],
|
||||
date_end=[parse_datetime("2019-12-27T18:11:19.117Z")],
|
||||
date_range=["7d"],
|
||||
date_start=[parse_datetime("2019-12-27T18:11:19.117Z")],
|
||||
dmarc=["PASS"],
|
||||
encrypted=["ENCRYPTED"],
|
||||
format="JSON",
|
||||
ip_version=["IPv4", "IPv6"],
|
||||
name=["string", "string", "string"],
|
||||
spf=["PASS", "NONE", "FAIL"],
|
||||
ip_version=["IPv4"],
|
||||
name=["string"],
|
||||
spf=["PASS"],
|
||||
)
|
||||
assert_matches_type(TimeseriesGroupDKIMResponse, timeseries_group, path=["response"])
|
||||
|
||||
|
|
@ -134,24 +118,16 @@ class TestTimeseriesGroups:
|
|||
def test_method_dmarc_with_all_params(self, client: Cloudflare) -> None:
|
||||
timeseries_group = client.radar.email.routing.timeseries_groups.dmarc(
|
||||
agg_interval="15m",
|
||||
arc=["PASS", "NONE", "FAIL"],
|
||||
date_end=[
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
],
|
||||
date_range=["7d", "7d", "7d"],
|
||||
date_start=[
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
],
|
||||
dkim=["PASS", "NONE", "FAIL"],
|
||||
encrypted=["ENCRYPTED", "NOT_ENCRYPTED"],
|
||||
arc=["PASS"],
|
||||
date_end=[parse_datetime("2019-12-27T18:11:19.117Z")],
|
||||
date_range=["7d"],
|
||||
date_start=[parse_datetime("2019-12-27T18:11:19.117Z")],
|
||||
dkim=["PASS"],
|
||||
encrypted=["ENCRYPTED"],
|
||||
format="JSON",
|
||||
ip_version=["IPv4", "IPv6"],
|
||||
name=["string", "string", "string"],
|
||||
spf=["PASS", "NONE", "FAIL"],
|
||||
ip_version=["IPv4"],
|
||||
name=["string"],
|
||||
spf=["PASS"],
|
||||
)
|
||||
assert_matches_type(TimeseriesGroupDMARCResponse, timeseries_group, path=["response"])
|
||||
|
||||
|
|
@ -184,24 +160,16 @@ class TestTimeseriesGroups:
|
|||
def test_method_encrypted_with_all_params(self, client: Cloudflare) -> None:
|
||||
timeseries_group = client.radar.email.routing.timeseries_groups.encrypted(
|
||||
agg_interval="15m",
|
||||
arc=["PASS", "NONE", "FAIL"],
|
||||
date_end=[
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
],
|
||||
date_range=["7d", "7d", "7d"],
|
||||
date_start=[
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
],
|
||||
dkim=["PASS", "NONE", "FAIL"],
|
||||
dmarc=["PASS", "NONE", "FAIL"],
|
||||
arc=["PASS"],
|
||||
date_end=[parse_datetime("2019-12-27T18:11:19.117Z")],
|
||||
date_range=["7d"],
|
||||
date_start=[parse_datetime("2019-12-27T18:11:19.117Z")],
|
||||
dkim=["PASS"],
|
||||
dmarc=["PASS"],
|
||||
format="JSON",
|
||||
ip_version=["IPv4", "IPv6"],
|
||||
name=["string", "string", "string"],
|
||||
spf=["PASS", "NONE", "FAIL"],
|
||||
ip_version=["IPv4"],
|
||||
name=["string"],
|
||||
spf=["PASS"],
|
||||
)
|
||||
assert_matches_type(TimeseriesGroupEncryptedResponse, timeseries_group, path=["response"])
|
||||
|
||||
|
|
@ -234,24 +202,16 @@ class TestTimeseriesGroups:
|
|||
def test_method_ip_version_with_all_params(self, client: Cloudflare) -> None:
|
||||
timeseries_group = client.radar.email.routing.timeseries_groups.ip_version(
|
||||
agg_interval="15m",
|
||||
arc=["PASS", "NONE", "FAIL"],
|
||||
date_end=[
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
],
|
||||
date_range=["7d", "7d", "7d"],
|
||||
date_start=[
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
],
|
||||
dkim=["PASS", "NONE", "FAIL"],
|
||||
dmarc=["PASS", "NONE", "FAIL"],
|
||||
encrypted=["ENCRYPTED", "NOT_ENCRYPTED"],
|
||||
arc=["PASS"],
|
||||
date_end=[parse_datetime("2019-12-27T18:11:19.117Z")],
|
||||
date_range=["7d"],
|
||||
date_start=[parse_datetime("2019-12-27T18:11:19.117Z")],
|
||||
dkim=["PASS"],
|
||||
dmarc=["PASS"],
|
||||
encrypted=["ENCRYPTED"],
|
||||
format="JSON",
|
||||
name=["string", "string", "string"],
|
||||
spf=["PASS", "NONE", "FAIL"],
|
||||
name=["string"],
|
||||
spf=["PASS"],
|
||||
)
|
||||
assert_matches_type(TimeseriesGroupIPVersionResponse, timeseries_group, path=["response"])
|
||||
|
||||
|
|
@ -284,24 +244,16 @@ class TestTimeseriesGroups:
|
|||
def test_method_spf_with_all_params(self, client: Cloudflare) -> None:
|
||||
timeseries_group = client.radar.email.routing.timeseries_groups.spf(
|
||||
agg_interval="15m",
|
||||
arc=["PASS", "NONE", "FAIL"],
|
||||
date_end=[
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
],
|
||||
date_range=["7d", "7d", "7d"],
|
||||
date_start=[
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
],
|
||||
dkim=["PASS", "NONE", "FAIL"],
|
||||
dmarc=["PASS", "NONE", "FAIL"],
|
||||
encrypted=["ENCRYPTED", "NOT_ENCRYPTED"],
|
||||
arc=["PASS"],
|
||||
date_end=[parse_datetime("2019-12-27T18:11:19.117Z")],
|
||||
date_range=["7d"],
|
||||
date_start=[parse_datetime("2019-12-27T18:11:19.117Z")],
|
||||
dkim=["PASS"],
|
||||
dmarc=["PASS"],
|
||||
encrypted=["ENCRYPTED"],
|
||||
format="JSON",
|
||||
ip_version=["IPv4", "IPv6"],
|
||||
name=["string", "string", "string"],
|
||||
ip_version=["IPv4"],
|
||||
name=["string"],
|
||||
)
|
||||
assert_matches_type(TimeseriesGroupSPFResponse, timeseries_group, path=["response"])
|
||||
|
||||
|
|
@ -338,24 +290,16 @@ class TestAsyncTimeseriesGroups:
|
|||
async def test_method_arc_with_all_params(self, async_client: AsyncCloudflare) -> None:
|
||||
timeseries_group = await async_client.radar.email.routing.timeseries_groups.arc(
|
||||
agg_interval="15m",
|
||||
date_end=[
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
],
|
||||
date_range=["7d", "7d", "7d"],
|
||||
date_start=[
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
],
|
||||
dkim=["PASS", "NONE", "FAIL"],
|
||||
dmarc=["PASS", "NONE", "FAIL"],
|
||||
encrypted=["ENCRYPTED", "NOT_ENCRYPTED"],
|
||||
date_end=[parse_datetime("2019-12-27T18:11:19.117Z")],
|
||||
date_range=["7d"],
|
||||
date_start=[parse_datetime("2019-12-27T18:11:19.117Z")],
|
||||
dkim=["PASS"],
|
||||
dmarc=["PASS"],
|
||||
encrypted=["ENCRYPTED"],
|
||||
format="JSON",
|
||||
ip_version=["IPv4", "IPv6"],
|
||||
name=["string", "string", "string"],
|
||||
spf=["PASS", "NONE", "FAIL"],
|
||||
ip_version=["IPv4"],
|
||||
name=["string"],
|
||||
spf=["PASS"],
|
||||
)
|
||||
assert_matches_type(TimeseriesGroupARCResponse, timeseries_group, path=["response"])
|
||||
|
||||
|
|
@ -388,24 +332,16 @@ class TestAsyncTimeseriesGroups:
|
|||
async def test_method_dkim_with_all_params(self, async_client: AsyncCloudflare) -> None:
|
||||
timeseries_group = await async_client.radar.email.routing.timeseries_groups.dkim(
|
||||
agg_interval="15m",
|
||||
arc=["PASS", "NONE", "FAIL"],
|
||||
date_end=[
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
],
|
||||
date_range=["7d", "7d", "7d"],
|
||||
date_start=[
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
],
|
||||
dmarc=["PASS", "NONE", "FAIL"],
|
||||
encrypted=["ENCRYPTED", "NOT_ENCRYPTED"],
|
||||
arc=["PASS"],
|
||||
date_end=[parse_datetime("2019-12-27T18:11:19.117Z")],
|
||||
date_range=["7d"],
|
||||
date_start=[parse_datetime("2019-12-27T18:11:19.117Z")],
|
||||
dmarc=["PASS"],
|
||||
encrypted=["ENCRYPTED"],
|
||||
format="JSON",
|
||||
ip_version=["IPv4", "IPv6"],
|
||||
name=["string", "string", "string"],
|
||||
spf=["PASS", "NONE", "FAIL"],
|
||||
ip_version=["IPv4"],
|
||||
name=["string"],
|
||||
spf=["PASS"],
|
||||
)
|
||||
assert_matches_type(TimeseriesGroupDKIMResponse, timeseries_group, path=["response"])
|
||||
|
||||
|
|
@ -438,24 +374,16 @@ class TestAsyncTimeseriesGroups:
|
|||
async def test_method_dmarc_with_all_params(self, async_client: AsyncCloudflare) -> None:
|
||||
timeseries_group = await async_client.radar.email.routing.timeseries_groups.dmarc(
|
||||
agg_interval="15m",
|
||||
arc=["PASS", "NONE", "FAIL"],
|
||||
date_end=[
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
],
|
||||
date_range=["7d", "7d", "7d"],
|
||||
date_start=[
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
],
|
||||
dkim=["PASS", "NONE", "FAIL"],
|
||||
encrypted=["ENCRYPTED", "NOT_ENCRYPTED"],
|
||||
arc=["PASS"],
|
||||
date_end=[parse_datetime("2019-12-27T18:11:19.117Z")],
|
||||
date_range=["7d"],
|
||||
date_start=[parse_datetime("2019-12-27T18:11:19.117Z")],
|
||||
dkim=["PASS"],
|
||||
encrypted=["ENCRYPTED"],
|
||||
format="JSON",
|
||||
ip_version=["IPv4", "IPv6"],
|
||||
name=["string", "string", "string"],
|
||||
spf=["PASS", "NONE", "FAIL"],
|
||||
ip_version=["IPv4"],
|
||||
name=["string"],
|
||||
spf=["PASS"],
|
||||
)
|
||||
assert_matches_type(TimeseriesGroupDMARCResponse, timeseries_group, path=["response"])
|
||||
|
||||
|
|
@ -488,24 +416,16 @@ class TestAsyncTimeseriesGroups:
|
|||
async def test_method_encrypted_with_all_params(self, async_client: AsyncCloudflare) -> None:
|
||||
timeseries_group = await async_client.radar.email.routing.timeseries_groups.encrypted(
|
||||
agg_interval="15m",
|
||||
arc=["PASS", "NONE", "FAIL"],
|
||||
date_end=[
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
],
|
||||
date_range=["7d", "7d", "7d"],
|
||||
date_start=[
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
],
|
||||
dkim=["PASS", "NONE", "FAIL"],
|
||||
dmarc=["PASS", "NONE", "FAIL"],
|
||||
arc=["PASS"],
|
||||
date_end=[parse_datetime("2019-12-27T18:11:19.117Z")],
|
||||
date_range=["7d"],
|
||||
date_start=[parse_datetime("2019-12-27T18:11:19.117Z")],
|
||||
dkim=["PASS"],
|
||||
dmarc=["PASS"],
|
||||
format="JSON",
|
||||
ip_version=["IPv4", "IPv6"],
|
||||
name=["string", "string", "string"],
|
||||
spf=["PASS", "NONE", "FAIL"],
|
||||
ip_version=["IPv4"],
|
||||
name=["string"],
|
||||
spf=["PASS"],
|
||||
)
|
||||
assert_matches_type(TimeseriesGroupEncryptedResponse, timeseries_group, path=["response"])
|
||||
|
||||
|
|
@ -538,24 +458,16 @@ class TestAsyncTimeseriesGroups:
|
|||
async def test_method_ip_version_with_all_params(self, async_client: AsyncCloudflare) -> None:
|
||||
timeseries_group = await async_client.radar.email.routing.timeseries_groups.ip_version(
|
||||
agg_interval="15m",
|
||||
arc=["PASS", "NONE", "FAIL"],
|
||||
date_end=[
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
],
|
||||
date_range=["7d", "7d", "7d"],
|
||||
date_start=[
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
],
|
||||
dkim=["PASS", "NONE", "FAIL"],
|
||||
dmarc=["PASS", "NONE", "FAIL"],
|
||||
encrypted=["ENCRYPTED", "NOT_ENCRYPTED"],
|
||||
arc=["PASS"],
|
||||
date_end=[parse_datetime("2019-12-27T18:11:19.117Z")],
|
||||
date_range=["7d"],
|
||||
date_start=[parse_datetime("2019-12-27T18:11:19.117Z")],
|
||||
dkim=["PASS"],
|
||||
dmarc=["PASS"],
|
||||
encrypted=["ENCRYPTED"],
|
||||
format="JSON",
|
||||
name=["string", "string", "string"],
|
||||
spf=["PASS", "NONE", "FAIL"],
|
||||
name=["string"],
|
||||
spf=["PASS"],
|
||||
)
|
||||
assert_matches_type(TimeseriesGroupIPVersionResponse, timeseries_group, path=["response"])
|
||||
|
||||
|
|
@ -588,24 +500,16 @@ class TestAsyncTimeseriesGroups:
|
|||
async def test_method_spf_with_all_params(self, async_client: AsyncCloudflare) -> None:
|
||||
timeseries_group = await async_client.radar.email.routing.timeseries_groups.spf(
|
||||
agg_interval="15m",
|
||||
arc=["PASS", "NONE", "FAIL"],
|
||||
date_end=[
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
],
|
||||
date_range=["7d", "7d", "7d"],
|
||||
date_start=[
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
],
|
||||
dkim=["PASS", "NONE", "FAIL"],
|
||||
dmarc=["PASS", "NONE", "FAIL"],
|
||||
encrypted=["ENCRYPTED", "NOT_ENCRYPTED"],
|
||||
arc=["PASS"],
|
||||
date_end=[parse_datetime("2019-12-27T18:11:19.117Z")],
|
||||
date_range=["7d"],
|
||||
date_start=[parse_datetime("2019-12-27T18:11:19.117Z")],
|
||||
dkim=["PASS"],
|
||||
dmarc=["PASS"],
|
||||
encrypted=["ENCRYPTED"],
|
||||
format="JSON",
|
||||
ip_version=["IPv4", "IPv6"],
|
||||
name=["string", "string", "string"],
|
||||
ip_version=["IPv4"],
|
||||
name=["string"],
|
||||
)
|
||||
assert_matches_type(TimeseriesGroupSPFResponse, timeseries_group, path=["response"])
|
||||
|
||||
|
|
|
|||
|
|
@ -36,23 +36,15 @@ class TestSummary:
|
|||
@parametrize
|
||||
def test_method_arc_with_all_params(self, client: Cloudflare) -> None:
|
||||
summary = client.radar.email.security.summary.arc(
|
||||
date_end=[
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
],
|
||||
date_range=["7d", "7d", "7d"],
|
||||
date_start=[
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
],
|
||||
dkim=["PASS", "NONE", "FAIL"],
|
||||
dmarc=["PASS", "NONE", "FAIL"],
|
||||
date_end=[parse_datetime("2019-12-27T18:11:19.117Z")],
|
||||
date_range=["7d"],
|
||||
date_start=[parse_datetime("2019-12-27T18:11:19.117Z")],
|
||||
dkim=["PASS"],
|
||||
dmarc=["PASS"],
|
||||
format="JSON",
|
||||
name=["string", "string", "string"],
|
||||
spf=["PASS", "NONE", "FAIL"],
|
||||
tls_version=["TLSv1_0", "TLSv1_1", "TLSv1_2"],
|
||||
name=["string"],
|
||||
spf=["PASS"],
|
||||
tls_version=["TLSv1_0"],
|
||||
)
|
||||
assert_matches_type(SummaryARCResponse, summary, path=["response"])
|
||||
|
||||
|
|
@ -84,23 +76,15 @@ class TestSummary:
|
|||
@parametrize
|
||||
def test_method_dkim_with_all_params(self, client: Cloudflare) -> None:
|
||||
summary = client.radar.email.security.summary.dkim(
|
||||
arc=["PASS", "NONE", "FAIL"],
|
||||
date_end=[
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
],
|
||||
date_range=["7d", "7d", "7d"],
|
||||
date_start=[
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
],
|
||||
dmarc=["PASS", "NONE", "FAIL"],
|
||||
arc=["PASS"],
|
||||
date_end=[parse_datetime("2019-12-27T18:11:19.117Z")],
|
||||
date_range=["7d"],
|
||||
date_start=[parse_datetime("2019-12-27T18:11:19.117Z")],
|
||||
dmarc=["PASS"],
|
||||
format="JSON",
|
||||
name=["string", "string", "string"],
|
||||
spf=["PASS", "NONE", "FAIL"],
|
||||
tls_version=["TLSv1_0", "TLSv1_1", "TLSv1_2"],
|
||||
name=["string"],
|
||||
spf=["PASS"],
|
||||
tls_version=["TLSv1_0"],
|
||||
)
|
||||
assert_matches_type(SummaryDKIMResponse, summary, path=["response"])
|
||||
|
||||
|
|
@ -132,23 +116,15 @@ class TestSummary:
|
|||
@parametrize
|
||||
def test_method_dmarc_with_all_params(self, client: Cloudflare) -> None:
|
||||
summary = client.radar.email.security.summary.dmarc(
|
||||
arc=["PASS", "NONE", "FAIL"],
|
||||
date_end=[
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
],
|
||||
date_range=["7d", "7d", "7d"],
|
||||
date_start=[
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
],
|
||||
dkim=["PASS", "NONE", "FAIL"],
|
||||
arc=["PASS"],
|
||||
date_end=[parse_datetime("2019-12-27T18:11:19.117Z")],
|
||||
date_range=["7d"],
|
||||
date_start=[parse_datetime("2019-12-27T18:11:19.117Z")],
|
||||
dkim=["PASS"],
|
||||
format="JSON",
|
||||
name=["string", "string", "string"],
|
||||
spf=["PASS", "NONE", "FAIL"],
|
||||
tls_version=["TLSv1_0", "TLSv1_1", "TLSv1_2"],
|
||||
name=["string"],
|
||||
spf=["PASS"],
|
||||
tls_version=["TLSv1_0"],
|
||||
)
|
||||
assert_matches_type(SummaryDMARCResponse, summary, path=["response"])
|
||||
|
||||
|
|
@ -180,24 +156,16 @@ class TestSummary:
|
|||
@parametrize
|
||||
def test_method_malicious_with_all_params(self, client: Cloudflare) -> None:
|
||||
summary = client.radar.email.security.summary.malicious(
|
||||
arc=["PASS", "NONE", "FAIL"],
|
||||
date_end=[
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
],
|
||||
date_range=["7d", "7d", "7d"],
|
||||
date_start=[
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
],
|
||||
dkim=["PASS", "NONE", "FAIL"],
|
||||
dmarc=["PASS", "NONE", "FAIL"],
|
||||
arc=["PASS"],
|
||||
date_end=[parse_datetime("2019-12-27T18:11:19.117Z")],
|
||||
date_range=["7d"],
|
||||
date_start=[parse_datetime("2019-12-27T18:11:19.117Z")],
|
||||
dkim=["PASS"],
|
||||
dmarc=["PASS"],
|
||||
format="JSON",
|
||||
name=["string", "string", "string"],
|
||||
spf=["PASS", "NONE", "FAIL"],
|
||||
tls_version=["TLSv1_0", "TLSv1_1", "TLSv1_2"],
|
||||
name=["string"],
|
||||
spf=["PASS"],
|
||||
tls_version=["TLSv1_0"],
|
||||
)
|
||||
assert_matches_type(SummaryMaliciousResponse, summary, path=["response"])
|
||||
|
||||
|
|
@ -229,24 +197,16 @@ class TestSummary:
|
|||
@parametrize
|
||||
def test_method_spam_with_all_params(self, client: Cloudflare) -> None:
|
||||
summary = client.radar.email.security.summary.spam(
|
||||
arc=["PASS", "NONE", "FAIL"],
|
||||
date_end=[
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
],
|
||||
date_range=["7d", "7d", "7d"],
|
||||
date_start=[
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
],
|
||||
dkim=["PASS", "NONE", "FAIL"],
|
||||
dmarc=["PASS", "NONE", "FAIL"],
|
||||
arc=["PASS"],
|
||||
date_end=[parse_datetime("2019-12-27T18:11:19.117Z")],
|
||||
date_range=["7d"],
|
||||
date_start=[parse_datetime("2019-12-27T18:11:19.117Z")],
|
||||
dkim=["PASS"],
|
||||
dmarc=["PASS"],
|
||||
format="JSON",
|
||||
name=["string", "string", "string"],
|
||||
spf=["PASS", "NONE", "FAIL"],
|
||||
tls_version=["TLSv1_0", "TLSv1_1", "TLSv1_2"],
|
||||
name=["string"],
|
||||
spf=["PASS"],
|
||||
tls_version=["TLSv1_0"],
|
||||
)
|
||||
assert_matches_type(SummarySpamResponse, summary, path=["response"])
|
||||
|
||||
|
|
@ -278,23 +238,15 @@ class TestSummary:
|
|||
@parametrize
|
||||
def test_method_spf_with_all_params(self, client: Cloudflare) -> None:
|
||||
summary = client.radar.email.security.summary.spf(
|
||||
arc=["PASS", "NONE", "FAIL"],
|
||||
date_end=[
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
],
|
||||
date_range=["7d", "7d", "7d"],
|
||||
date_start=[
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
],
|
||||
dkim=["PASS", "NONE", "FAIL"],
|
||||
dmarc=["PASS", "NONE", "FAIL"],
|
||||
arc=["PASS"],
|
||||
date_end=[parse_datetime("2019-12-27T18:11:19.117Z")],
|
||||
date_range=["7d"],
|
||||
date_start=[parse_datetime("2019-12-27T18:11:19.117Z")],
|
||||
dkim=["PASS"],
|
||||
dmarc=["PASS"],
|
||||
format="JSON",
|
||||
name=["string", "string", "string"],
|
||||
tls_version=["TLSv1_0", "TLSv1_1", "TLSv1_2"],
|
||||
name=["string"],
|
||||
tls_version=["TLSv1_0"],
|
||||
)
|
||||
assert_matches_type(SummarySPFResponse, summary, path=["response"])
|
||||
|
||||
|
|
@ -326,24 +278,16 @@ class TestSummary:
|
|||
@parametrize
|
||||
def test_method_spoof_with_all_params(self, client: Cloudflare) -> None:
|
||||
summary = client.radar.email.security.summary.spoof(
|
||||
arc=["PASS", "NONE", "FAIL"],
|
||||
date_end=[
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
],
|
||||
date_range=["7d", "7d", "7d"],
|
||||
date_start=[
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
],
|
||||
dkim=["PASS", "NONE", "FAIL"],
|
||||
dmarc=["PASS", "NONE", "FAIL"],
|
||||
arc=["PASS"],
|
||||
date_end=[parse_datetime("2019-12-27T18:11:19.117Z")],
|
||||
date_range=["7d"],
|
||||
date_start=[parse_datetime("2019-12-27T18:11:19.117Z")],
|
||||
dkim=["PASS"],
|
||||
dmarc=["PASS"],
|
||||
format="JSON",
|
||||
name=["string", "string", "string"],
|
||||
spf=["PASS", "NONE", "FAIL"],
|
||||
tls_version=["TLSv1_0", "TLSv1_1", "TLSv1_2"],
|
||||
name=["string"],
|
||||
spf=["PASS"],
|
||||
tls_version=["TLSv1_0"],
|
||||
)
|
||||
assert_matches_type(SummarySpoofResponse, summary, path=["response"])
|
||||
|
||||
|
|
@ -375,24 +319,16 @@ class TestSummary:
|
|||
@parametrize
|
||||
def test_method_threat_category_with_all_params(self, client: Cloudflare) -> None:
|
||||
summary = client.radar.email.security.summary.threat_category(
|
||||
arc=["PASS", "NONE", "FAIL"],
|
||||
date_end=[
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
],
|
||||
date_range=["7d", "7d", "7d"],
|
||||
date_start=[
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
],
|
||||
dkim=["PASS", "NONE", "FAIL"],
|
||||
dmarc=["PASS", "NONE", "FAIL"],
|
||||
arc=["PASS"],
|
||||
date_end=[parse_datetime("2019-12-27T18:11:19.117Z")],
|
||||
date_range=["7d"],
|
||||
date_start=[parse_datetime("2019-12-27T18:11:19.117Z")],
|
||||
dkim=["PASS"],
|
||||
dmarc=["PASS"],
|
||||
format="JSON",
|
||||
name=["string", "string", "string"],
|
||||
spf=["PASS", "NONE", "FAIL"],
|
||||
tls_version=["TLSv1_0", "TLSv1_1", "TLSv1_2"],
|
||||
name=["string"],
|
||||
spf=["PASS"],
|
||||
tls_version=["TLSv1_0"],
|
||||
)
|
||||
assert_matches_type(SummaryThreatCategoryResponse, summary, path=["response"])
|
||||
|
||||
|
|
@ -424,23 +360,15 @@ class TestSummary:
|
|||
@parametrize
|
||||
def test_method_tls_version_with_all_params(self, client: Cloudflare) -> None:
|
||||
summary = client.radar.email.security.summary.tls_version(
|
||||
arc=["PASS", "NONE", "FAIL"],
|
||||
date_end=[
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
],
|
||||
date_range=["7d", "7d", "7d"],
|
||||
date_start=[
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
],
|
||||
dkim=["PASS", "NONE", "FAIL"],
|
||||
dmarc=["PASS", "NONE", "FAIL"],
|
||||
arc=["PASS"],
|
||||
date_end=[parse_datetime("2019-12-27T18:11:19.117Z")],
|
||||
date_range=["7d"],
|
||||
date_start=[parse_datetime("2019-12-27T18:11:19.117Z")],
|
||||
dkim=["PASS"],
|
||||
dmarc=["PASS"],
|
||||
format="JSON",
|
||||
name=["string", "string", "string"],
|
||||
spf=["PASS", "NONE", "FAIL"],
|
||||
name=["string"],
|
||||
spf=["PASS"],
|
||||
)
|
||||
assert_matches_type(SummaryTLSVersionResponse, summary, path=["response"])
|
||||
|
||||
|
|
@ -476,23 +404,15 @@ class TestAsyncSummary:
|
|||
@parametrize
|
||||
async def test_method_arc_with_all_params(self, async_client: AsyncCloudflare) -> None:
|
||||
summary = await async_client.radar.email.security.summary.arc(
|
||||
date_end=[
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
],
|
||||
date_range=["7d", "7d", "7d"],
|
||||
date_start=[
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
],
|
||||
dkim=["PASS", "NONE", "FAIL"],
|
||||
dmarc=["PASS", "NONE", "FAIL"],
|
||||
date_end=[parse_datetime("2019-12-27T18:11:19.117Z")],
|
||||
date_range=["7d"],
|
||||
date_start=[parse_datetime("2019-12-27T18:11:19.117Z")],
|
||||
dkim=["PASS"],
|
||||
dmarc=["PASS"],
|
||||
format="JSON",
|
||||
name=["string", "string", "string"],
|
||||
spf=["PASS", "NONE", "FAIL"],
|
||||
tls_version=["TLSv1_0", "TLSv1_1", "TLSv1_2"],
|
||||
name=["string"],
|
||||
spf=["PASS"],
|
||||
tls_version=["TLSv1_0"],
|
||||
)
|
||||
assert_matches_type(SummaryARCResponse, summary, path=["response"])
|
||||
|
||||
|
|
@ -524,23 +444,15 @@ class TestAsyncSummary:
|
|||
@parametrize
|
||||
async def test_method_dkim_with_all_params(self, async_client: AsyncCloudflare) -> None:
|
||||
summary = await async_client.radar.email.security.summary.dkim(
|
||||
arc=["PASS", "NONE", "FAIL"],
|
||||
date_end=[
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
],
|
||||
date_range=["7d", "7d", "7d"],
|
||||
date_start=[
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
],
|
||||
dmarc=["PASS", "NONE", "FAIL"],
|
||||
arc=["PASS"],
|
||||
date_end=[parse_datetime("2019-12-27T18:11:19.117Z")],
|
||||
date_range=["7d"],
|
||||
date_start=[parse_datetime("2019-12-27T18:11:19.117Z")],
|
||||
dmarc=["PASS"],
|
||||
format="JSON",
|
||||
name=["string", "string", "string"],
|
||||
spf=["PASS", "NONE", "FAIL"],
|
||||
tls_version=["TLSv1_0", "TLSv1_1", "TLSv1_2"],
|
||||
name=["string"],
|
||||
spf=["PASS"],
|
||||
tls_version=["TLSv1_0"],
|
||||
)
|
||||
assert_matches_type(SummaryDKIMResponse, summary, path=["response"])
|
||||
|
||||
|
|
@ -572,23 +484,15 @@ class TestAsyncSummary:
|
|||
@parametrize
|
||||
async def test_method_dmarc_with_all_params(self, async_client: AsyncCloudflare) -> None:
|
||||
summary = await async_client.radar.email.security.summary.dmarc(
|
||||
arc=["PASS", "NONE", "FAIL"],
|
||||
date_end=[
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
],
|
||||
date_range=["7d", "7d", "7d"],
|
||||
date_start=[
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
],
|
||||
dkim=["PASS", "NONE", "FAIL"],
|
||||
arc=["PASS"],
|
||||
date_end=[parse_datetime("2019-12-27T18:11:19.117Z")],
|
||||
date_range=["7d"],
|
||||
date_start=[parse_datetime("2019-12-27T18:11:19.117Z")],
|
||||
dkim=["PASS"],
|
||||
format="JSON",
|
||||
name=["string", "string", "string"],
|
||||
spf=["PASS", "NONE", "FAIL"],
|
||||
tls_version=["TLSv1_0", "TLSv1_1", "TLSv1_2"],
|
||||
name=["string"],
|
||||
spf=["PASS"],
|
||||
tls_version=["TLSv1_0"],
|
||||
)
|
||||
assert_matches_type(SummaryDMARCResponse, summary, path=["response"])
|
||||
|
||||
|
|
@ -620,24 +524,16 @@ class TestAsyncSummary:
|
|||
@parametrize
|
||||
async def test_method_malicious_with_all_params(self, async_client: AsyncCloudflare) -> None:
|
||||
summary = await async_client.radar.email.security.summary.malicious(
|
||||
arc=["PASS", "NONE", "FAIL"],
|
||||
date_end=[
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
],
|
||||
date_range=["7d", "7d", "7d"],
|
||||
date_start=[
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
],
|
||||
dkim=["PASS", "NONE", "FAIL"],
|
||||
dmarc=["PASS", "NONE", "FAIL"],
|
||||
arc=["PASS"],
|
||||
date_end=[parse_datetime("2019-12-27T18:11:19.117Z")],
|
||||
date_range=["7d"],
|
||||
date_start=[parse_datetime("2019-12-27T18:11:19.117Z")],
|
||||
dkim=["PASS"],
|
||||
dmarc=["PASS"],
|
||||
format="JSON",
|
||||
name=["string", "string", "string"],
|
||||
spf=["PASS", "NONE", "FAIL"],
|
||||
tls_version=["TLSv1_0", "TLSv1_1", "TLSv1_2"],
|
||||
name=["string"],
|
||||
spf=["PASS"],
|
||||
tls_version=["TLSv1_0"],
|
||||
)
|
||||
assert_matches_type(SummaryMaliciousResponse, summary, path=["response"])
|
||||
|
||||
|
|
@ -669,24 +565,16 @@ class TestAsyncSummary:
|
|||
@parametrize
|
||||
async def test_method_spam_with_all_params(self, async_client: AsyncCloudflare) -> None:
|
||||
summary = await async_client.radar.email.security.summary.spam(
|
||||
arc=["PASS", "NONE", "FAIL"],
|
||||
date_end=[
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
],
|
||||
date_range=["7d", "7d", "7d"],
|
||||
date_start=[
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
],
|
||||
dkim=["PASS", "NONE", "FAIL"],
|
||||
dmarc=["PASS", "NONE", "FAIL"],
|
||||
arc=["PASS"],
|
||||
date_end=[parse_datetime("2019-12-27T18:11:19.117Z")],
|
||||
date_range=["7d"],
|
||||
date_start=[parse_datetime("2019-12-27T18:11:19.117Z")],
|
||||
dkim=["PASS"],
|
||||
dmarc=["PASS"],
|
||||
format="JSON",
|
||||
name=["string", "string", "string"],
|
||||
spf=["PASS", "NONE", "FAIL"],
|
||||
tls_version=["TLSv1_0", "TLSv1_1", "TLSv1_2"],
|
||||
name=["string"],
|
||||
spf=["PASS"],
|
||||
tls_version=["TLSv1_0"],
|
||||
)
|
||||
assert_matches_type(SummarySpamResponse, summary, path=["response"])
|
||||
|
||||
|
|
@ -718,23 +606,15 @@ class TestAsyncSummary:
|
|||
@parametrize
|
||||
async def test_method_spf_with_all_params(self, async_client: AsyncCloudflare) -> None:
|
||||
summary = await async_client.radar.email.security.summary.spf(
|
||||
arc=["PASS", "NONE", "FAIL"],
|
||||
date_end=[
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
],
|
||||
date_range=["7d", "7d", "7d"],
|
||||
date_start=[
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
],
|
||||
dkim=["PASS", "NONE", "FAIL"],
|
||||
dmarc=["PASS", "NONE", "FAIL"],
|
||||
arc=["PASS"],
|
||||
date_end=[parse_datetime("2019-12-27T18:11:19.117Z")],
|
||||
date_range=["7d"],
|
||||
date_start=[parse_datetime("2019-12-27T18:11:19.117Z")],
|
||||
dkim=["PASS"],
|
||||
dmarc=["PASS"],
|
||||
format="JSON",
|
||||
name=["string", "string", "string"],
|
||||
tls_version=["TLSv1_0", "TLSv1_1", "TLSv1_2"],
|
||||
name=["string"],
|
||||
tls_version=["TLSv1_0"],
|
||||
)
|
||||
assert_matches_type(SummarySPFResponse, summary, path=["response"])
|
||||
|
||||
|
|
@ -766,24 +646,16 @@ class TestAsyncSummary:
|
|||
@parametrize
|
||||
async def test_method_spoof_with_all_params(self, async_client: AsyncCloudflare) -> None:
|
||||
summary = await async_client.radar.email.security.summary.spoof(
|
||||
arc=["PASS", "NONE", "FAIL"],
|
||||
date_end=[
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
],
|
||||
date_range=["7d", "7d", "7d"],
|
||||
date_start=[
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
],
|
||||
dkim=["PASS", "NONE", "FAIL"],
|
||||
dmarc=["PASS", "NONE", "FAIL"],
|
||||
arc=["PASS"],
|
||||
date_end=[parse_datetime("2019-12-27T18:11:19.117Z")],
|
||||
date_range=["7d"],
|
||||
date_start=[parse_datetime("2019-12-27T18:11:19.117Z")],
|
||||
dkim=["PASS"],
|
||||
dmarc=["PASS"],
|
||||
format="JSON",
|
||||
name=["string", "string", "string"],
|
||||
spf=["PASS", "NONE", "FAIL"],
|
||||
tls_version=["TLSv1_0", "TLSv1_1", "TLSv1_2"],
|
||||
name=["string"],
|
||||
spf=["PASS"],
|
||||
tls_version=["TLSv1_0"],
|
||||
)
|
||||
assert_matches_type(SummarySpoofResponse, summary, path=["response"])
|
||||
|
||||
|
|
@ -815,24 +687,16 @@ class TestAsyncSummary:
|
|||
@parametrize
|
||||
async def test_method_threat_category_with_all_params(self, async_client: AsyncCloudflare) -> None:
|
||||
summary = await async_client.radar.email.security.summary.threat_category(
|
||||
arc=["PASS", "NONE", "FAIL"],
|
||||
date_end=[
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
],
|
||||
date_range=["7d", "7d", "7d"],
|
||||
date_start=[
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
],
|
||||
dkim=["PASS", "NONE", "FAIL"],
|
||||
dmarc=["PASS", "NONE", "FAIL"],
|
||||
arc=["PASS"],
|
||||
date_end=[parse_datetime("2019-12-27T18:11:19.117Z")],
|
||||
date_range=["7d"],
|
||||
date_start=[parse_datetime("2019-12-27T18:11:19.117Z")],
|
||||
dkim=["PASS"],
|
||||
dmarc=["PASS"],
|
||||
format="JSON",
|
||||
name=["string", "string", "string"],
|
||||
spf=["PASS", "NONE", "FAIL"],
|
||||
tls_version=["TLSv1_0", "TLSv1_1", "TLSv1_2"],
|
||||
name=["string"],
|
||||
spf=["PASS"],
|
||||
tls_version=["TLSv1_0"],
|
||||
)
|
||||
assert_matches_type(SummaryThreatCategoryResponse, summary, path=["response"])
|
||||
|
||||
|
|
@ -864,23 +728,15 @@ class TestAsyncSummary:
|
|||
@parametrize
|
||||
async def test_method_tls_version_with_all_params(self, async_client: AsyncCloudflare) -> None:
|
||||
summary = await async_client.radar.email.security.summary.tls_version(
|
||||
arc=["PASS", "NONE", "FAIL"],
|
||||
date_end=[
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
],
|
||||
date_range=["7d", "7d", "7d"],
|
||||
date_start=[
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
],
|
||||
dkim=["PASS", "NONE", "FAIL"],
|
||||
dmarc=["PASS", "NONE", "FAIL"],
|
||||
arc=["PASS"],
|
||||
date_end=[parse_datetime("2019-12-27T18:11:19.117Z")],
|
||||
date_range=["7d"],
|
||||
date_start=[parse_datetime("2019-12-27T18:11:19.117Z")],
|
||||
dkim=["PASS"],
|
||||
dmarc=["PASS"],
|
||||
format="JSON",
|
||||
name=["string", "string", "string"],
|
||||
spf=["PASS", "NONE", "FAIL"],
|
||||
name=["string"],
|
||||
spf=["PASS"],
|
||||
)
|
||||
assert_matches_type(SummaryTLSVersionResponse, summary, path=["response"])
|
||||
|
||||
|
|
|
|||
|
|
@ -37,23 +37,15 @@ class TestTimeseriesGroups:
|
|||
def test_method_arc_with_all_params(self, client: Cloudflare) -> None:
|
||||
timeseries_group = client.radar.email.security.timeseries_groups.arc(
|
||||
agg_interval="15m",
|
||||
date_end=[
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
],
|
||||
date_range=["7d", "7d", "7d"],
|
||||
date_start=[
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
],
|
||||
dkim=["PASS", "NONE", "FAIL"],
|
||||
dmarc=["PASS", "NONE", "FAIL"],
|
||||
date_end=[parse_datetime("2019-12-27T18:11:19.117Z")],
|
||||
date_range=["7d"],
|
||||
date_start=[parse_datetime("2019-12-27T18:11:19.117Z")],
|
||||
dkim=["PASS"],
|
||||
dmarc=["PASS"],
|
||||
format="JSON",
|
||||
name=["string", "string", "string"],
|
||||
spf=["PASS", "NONE", "FAIL"],
|
||||
tls_version=["TLSv1_0", "TLSv1_1", "TLSv1_2"],
|
||||
name=["string"],
|
||||
spf=["PASS"],
|
||||
tls_version=["TLSv1_0"],
|
||||
)
|
||||
assert_matches_type(TimeseriesGroupARCResponse, timeseries_group, path=["response"])
|
||||
|
||||
|
|
@ -86,23 +78,15 @@ class TestTimeseriesGroups:
|
|||
def test_method_dkim_with_all_params(self, client: Cloudflare) -> None:
|
||||
timeseries_group = client.radar.email.security.timeseries_groups.dkim(
|
||||
agg_interval="15m",
|
||||
arc=["PASS", "NONE", "FAIL"],
|
||||
date_end=[
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
],
|
||||
date_range=["7d", "7d", "7d"],
|
||||
date_start=[
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
],
|
||||
dmarc=["PASS", "NONE", "FAIL"],
|
||||
arc=["PASS"],
|
||||
date_end=[parse_datetime("2019-12-27T18:11:19.117Z")],
|
||||
date_range=["7d"],
|
||||
date_start=[parse_datetime("2019-12-27T18:11:19.117Z")],
|
||||
dmarc=["PASS"],
|
||||
format="JSON",
|
||||
name=["string", "string", "string"],
|
||||
spf=["PASS", "NONE", "FAIL"],
|
||||
tls_version=["TLSv1_0", "TLSv1_1", "TLSv1_2"],
|
||||
name=["string"],
|
||||
spf=["PASS"],
|
||||
tls_version=["TLSv1_0"],
|
||||
)
|
||||
assert_matches_type(TimeseriesGroupDKIMResponse, timeseries_group, path=["response"])
|
||||
|
||||
|
|
@ -135,23 +119,15 @@ class TestTimeseriesGroups:
|
|||
def test_method_dmarc_with_all_params(self, client: Cloudflare) -> None:
|
||||
timeseries_group = client.radar.email.security.timeseries_groups.dmarc(
|
||||
agg_interval="15m",
|
||||
arc=["PASS", "NONE", "FAIL"],
|
||||
date_end=[
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
],
|
||||
date_range=["7d", "7d", "7d"],
|
||||
date_start=[
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
],
|
||||
dkim=["PASS", "NONE", "FAIL"],
|
||||
arc=["PASS"],
|
||||
date_end=[parse_datetime("2019-12-27T18:11:19.117Z")],
|
||||
date_range=["7d"],
|
||||
date_start=[parse_datetime("2019-12-27T18:11:19.117Z")],
|
||||
dkim=["PASS"],
|
||||
format="JSON",
|
||||
name=["string", "string", "string"],
|
||||
spf=["PASS", "NONE", "FAIL"],
|
||||
tls_version=["TLSv1_0", "TLSv1_1", "TLSv1_2"],
|
||||
name=["string"],
|
||||
spf=["PASS"],
|
||||
tls_version=["TLSv1_0"],
|
||||
)
|
||||
assert_matches_type(TimeseriesGroupDMARCResponse, timeseries_group, path=["response"])
|
||||
|
||||
|
|
@ -184,24 +160,16 @@ class TestTimeseriesGroups:
|
|||
def test_method_malicious_with_all_params(self, client: Cloudflare) -> None:
|
||||
timeseries_group = client.radar.email.security.timeseries_groups.malicious(
|
||||
agg_interval="15m",
|
||||
arc=["PASS", "NONE", "FAIL"],
|
||||
date_end=[
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
],
|
||||
date_range=["7d", "7d", "7d"],
|
||||
date_start=[
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
],
|
||||
dkim=["PASS", "NONE", "FAIL"],
|
||||
dmarc=["PASS", "NONE", "FAIL"],
|
||||
arc=["PASS"],
|
||||
date_end=[parse_datetime("2019-12-27T18:11:19.117Z")],
|
||||
date_range=["7d"],
|
||||
date_start=[parse_datetime("2019-12-27T18:11:19.117Z")],
|
||||
dkim=["PASS"],
|
||||
dmarc=["PASS"],
|
||||
format="JSON",
|
||||
name=["string", "string", "string"],
|
||||
spf=["PASS", "NONE", "FAIL"],
|
||||
tls_version=["TLSv1_0", "TLSv1_1", "TLSv1_2"],
|
||||
name=["string"],
|
||||
spf=["PASS"],
|
||||
tls_version=["TLSv1_0"],
|
||||
)
|
||||
assert_matches_type(TimeseriesGroupMaliciousResponse, timeseries_group, path=["response"])
|
||||
|
||||
|
|
@ -234,24 +202,16 @@ class TestTimeseriesGroups:
|
|||
def test_method_spam_with_all_params(self, client: Cloudflare) -> None:
|
||||
timeseries_group = client.radar.email.security.timeseries_groups.spam(
|
||||
agg_interval="15m",
|
||||
arc=["PASS", "NONE", "FAIL"],
|
||||
date_end=[
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
],
|
||||
date_range=["7d", "7d", "7d"],
|
||||
date_start=[
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
],
|
||||
dkim=["PASS", "NONE", "FAIL"],
|
||||
dmarc=["PASS", "NONE", "FAIL"],
|
||||
arc=["PASS"],
|
||||
date_end=[parse_datetime("2019-12-27T18:11:19.117Z")],
|
||||
date_range=["7d"],
|
||||
date_start=[parse_datetime("2019-12-27T18:11:19.117Z")],
|
||||
dkim=["PASS"],
|
||||
dmarc=["PASS"],
|
||||
format="JSON",
|
||||
name=["string", "string", "string"],
|
||||
spf=["PASS", "NONE", "FAIL"],
|
||||
tls_version=["TLSv1_0", "TLSv1_1", "TLSv1_2"],
|
||||
name=["string"],
|
||||
spf=["PASS"],
|
||||
tls_version=["TLSv1_0"],
|
||||
)
|
||||
assert_matches_type(TimeseriesGroupSpamResponse, timeseries_group, path=["response"])
|
||||
|
||||
|
|
@ -284,23 +244,15 @@ class TestTimeseriesGroups:
|
|||
def test_method_spf_with_all_params(self, client: Cloudflare) -> None:
|
||||
timeseries_group = client.radar.email.security.timeseries_groups.spf(
|
||||
agg_interval="15m",
|
||||
arc=["PASS", "NONE", "FAIL"],
|
||||
date_end=[
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
],
|
||||
date_range=["7d", "7d", "7d"],
|
||||
date_start=[
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
],
|
||||
dkim=["PASS", "NONE", "FAIL"],
|
||||
dmarc=["PASS", "NONE", "FAIL"],
|
||||
arc=["PASS"],
|
||||
date_end=[parse_datetime("2019-12-27T18:11:19.117Z")],
|
||||
date_range=["7d"],
|
||||
date_start=[parse_datetime("2019-12-27T18:11:19.117Z")],
|
||||
dkim=["PASS"],
|
||||
dmarc=["PASS"],
|
||||
format="JSON",
|
||||
name=["string", "string", "string"],
|
||||
tls_version=["TLSv1_0", "TLSv1_1", "TLSv1_2"],
|
||||
name=["string"],
|
||||
tls_version=["TLSv1_0"],
|
||||
)
|
||||
assert_matches_type(TimeseriesGroupSPFResponse, timeseries_group, path=["response"])
|
||||
|
||||
|
|
@ -333,24 +285,16 @@ class TestTimeseriesGroups:
|
|||
def test_method_spoof_with_all_params(self, client: Cloudflare) -> None:
|
||||
timeseries_group = client.radar.email.security.timeseries_groups.spoof(
|
||||
agg_interval="15m",
|
||||
arc=["PASS", "NONE", "FAIL"],
|
||||
date_end=[
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
],
|
||||
date_range=["7d", "7d", "7d"],
|
||||
date_start=[
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
],
|
||||
dkim=["PASS", "NONE", "FAIL"],
|
||||
dmarc=["PASS", "NONE", "FAIL"],
|
||||
arc=["PASS"],
|
||||
date_end=[parse_datetime("2019-12-27T18:11:19.117Z")],
|
||||
date_range=["7d"],
|
||||
date_start=[parse_datetime("2019-12-27T18:11:19.117Z")],
|
||||
dkim=["PASS"],
|
||||
dmarc=["PASS"],
|
||||
format="JSON",
|
||||
name=["string", "string", "string"],
|
||||
spf=["PASS", "NONE", "FAIL"],
|
||||
tls_version=["TLSv1_0", "TLSv1_1", "TLSv1_2"],
|
||||
name=["string"],
|
||||
spf=["PASS"],
|
||||
tls_version=["TLSv1_0"],
|
||||
)
|
||||
assert_matches_type(TimeseriesGroupSpoofResponse, timeseries_group, path=["response"])
|
||||
|
||||
|
|
@ -383,24 +327,16 @@ class TestTimeseriesGroups:
|
|||
def test_method_threat_category_with_all_params(self, client: Cloudflare) -> None:
|
||||
timeseries_group = client.radar.email.security.timeseries_groups.threat_category(
|
||||
agg_interval="15m",
|
||||
arc=["PASS", "NONE", "FAIL"],
|
||||
date_end=[
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
],
|
||||
date_range=["7d", "7d", "7d"],
|
||||
date_start=[
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
],
|
||||
dkim=["PASS", "NONE", "FAIL"],
|
||||
dmarc=["PASS", "NONE", "FAIL"],
|
||||
arc=["PASS"],
|
||||
date_end=[parse_datetime("2019-12-27T18:11:19.117Z")],
|
||||
date_range=["7d"],
|
||||
date_start=[parse_datetime("2019-12-27T18:11:19.117Z")],
|
||||
dkim=["PASS"],
|
||||
dmarc=["PASS"],
|
||||
format="JSON",
|
||||
name=["string", "string", "string"],
|
||||
spf=["PASS", "NONE", "FAIL"],
|
||||
tls_version=["TLSv1_0", "TLSv1_1", "TLSv1_2"],
|
||||
name=["string"],
|
||||
spf=["PASS"],
|
||||
tls_version=["TLSv1_0"],
|
||||
)
|
||||
assert_matches_type(TimeseriesGroupThreatCategoryResponse, timeseries_group, path=["response"])
|
||||
|
||||
|
|
@ -433,23 +369,15 @@ class TestTimeseriesGroups:
|
|||
def test_method_tls_version_with_all_params(self, client: Cloudflare) -> None:
|
||||
timeseries_group = client.radar.email.security.timeseries_groups.tls_version(
|
||||
agg_interval="15m",
|
||||
arc=["PASS", "NONE", "FAIL"],
|
||||
date_end=[
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
],
|
||||
date_range=["7d", "7d", "7d"],
|
||||
date_start=[
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
],
|
||||
dkim=["PASS", "NONE", "FAIL"],
|
||||
dmarc=["PASS", "NONE", "FAIL"],
|
||||
arc=["PASS"],
|
||||
date_end=[parse_datetime("2019-12-27T18:11:19.117Z")],
|
||||
date_range=["7d"],
|
||||
date_start=[parse_datetime("2019-12-27T18:11:19.117Z")],
|
||||
dkim=["PASS"],
|
||||
dmarc=["PASS"],
|
||||
format="JSON",
|
||||
name=["string", "string", "string"],
|
||||
spf=["PASS", "NONE", "FAIL"],
|
||||
name=["string"],
|
||||
spf=["PASS"],
|
||||
)
|
||||
assert_matches_type(TimeseriesGroupTLSVersionResponse, timeseries_group, path=["response"])
|
||||
|
||||
|
|
@ -486,23 +414,15 @@ class TestAsyncTimeseriesGroups:
|
|||
async def test_method_arc_with_all_params(self, async_client: AsyncCloudflare) -> None:
|
||||
timeseries_group = await async_client.radar.email.security.timeseries_groups.arc(
|
||||
agg_interval="15m",
|
||||
date_end=[
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
],
|
||||
date_range=["7d", "7d", "7d"],
|
||||
date_start=[
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
],
|
||||
dkim=["PASS", "NONE", "FAIL"],
|
||||
dmarc=["PASS", "NONE", "FAIL"],
|
||||
date_end=[parse_datetime("2019-12-27T18:11:19.117Z")],
|
||||
date_range=["7d"],
|
||||
date_start=[parse_datetime("2019-12-27T18:11:19.117Z")],
|
||||
dkim=["PASS"],
|
||||
dmarc=["PASS"],
|
||||
format="JSON",
|
||||
name=["string", "string", "string"],
|
||||
spf=["PASS", "NONE", "FAIL"],
|
||||
tls_version=["TLSv1_0", "TLSv1_1", "TLSv1_2"],
|
||||
name=["string"],
|
||||
spf=["PASS"],
|
||||
tls_version=["TLSv1_0"],
|
||||
)
|
||||
assert_matches_type(TimeseriesGroupARCResponse, timeseries_group, path=["response"])
|
||||
|
||||
|
|
@ -535,23 +455,15 @@ class TestAsyncTimeseriesGroups:
|
|||
async def test_method_dkim_with_all_params(self, async_client: AsyncCloudflare) -> None:
|
||||
timeseries_group = await async_client.radar.email.security.timeseries_groups.dkim(
|
||||
agg_interval="15m",
|
||||
arc=["PASS", "NONE", "FAIL"],
|
||||
date_end=[
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
],
|
||||
date_range=["7d", "7d", "7d"],
|
||||
date_start=[
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
],
|
||||
dmarc=["PASS", "NONE", "FAIL"],
|
||||
arc=["PASS"],
|
||||
date_end=[parse_datetime("2019-12-27T18:11:19.117Z")],
|
||||
date_range=["7d"],
|
||||
date_start=[parse_datetime("2019-12-27T18:11:19.117Z")],
|
||||
dmarc=["PASS"],
|
||||
format="JSON",
|
||||
name=["string", "string", "string"],
|
||||
spf=["PASS", "NONE", "FAIL"],
|
||||
tls_version=["TLSv1_0", "TLSv1_1", "TLSv1_2"],
|
||||
name=["string"],
|
||||
spf=["PASS"],
|
||||
tls_version=["TLSv1_0"],
|
||||
)
|
||||
assert_matches_type(TimeseriesGroupDKIMResponse, timeseries_group, path=["response"])
|
||||
|
||||
|
|
@ -584,23 +496,15 @@ class TestAsyncTimeseriesGroups:
|
|||
async def test_method_dmarc_with_all_params(self, async_client: AsyncCloudflare) -> None:
|
||||
timeseries_group = await async_client.radar.email.security.timeseries_groups.dmarc(
|
||||
agg_interval="15m",
|
||||
arc=["PASS", "NONE", "FAIL"],
|
||||
date_end=[
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
],
|
||||
date_range=["7d", "7d", "7d"],
|
||||
date_start=[
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
],
|
||||
dkim=["PASS", "NONE", "FAIL"],
|
||||
arc=["PASS"],
|
||||
date_end=[parse_datetime("2019-12-27T18:11:19.117Z")],
|
||||
date_range=["7d"],
|
||||
date_start=[parse_datetime("2019-12-27T18:11:19.117Z")],
|
||||
dkim=["PASS"],
|
||||
format="JSON",
|
||||
name=["string", "string", "string"],
|
||||
spf=["PASS", "NONE", "FAIL"],
|
||||
tls_version=["TLSv1_0", "TLSv1_1", "TLSv1_2"],
|
||||
name=["string"],
|
||||
spf=["PASS"],
|
||||
tls_version=["TLSv1_0"],
|
||||
)
|
||||
assert_matches_type(TimeseriesGroupDMARCResponse, timeseries_group, path=["response"])
|
||||
|
||||
|
|
@ -633,24 +537,16 @@ class TestAsyncTimeseriesGroups:
|
|||
async def test_method_malicious_with_all_params(self, async_client: AsyncCloudflare) -> None:
|
||||
timeseries_group = await async_client.radar.email.security.timeseries_groups.malicious(
|
||||
agg_interval="15m",
|
||||
arc=["PASS", "NONE", "FAIL"],
|
||||
date_end=[
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
],
|
||||
date_range=["7d", "7d", "7d"],
|
||||
date_start=[
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
],
|
||||
dkim=["PASS", "NONE", "FAIL"],
|
||||
dmarc=["PASS", "NONE", "FAIL"],
|
||||
arc=["PASS"],
|
||||
date_end=[parse_datetime("2019-12-27T18:11:19.117Z")],
|
||||
date_range=["7d"],
|
||||
date_start=[parse_datetime("2019-12-27T18:11:19.117Z")],
|
||||
dkim=["PASS"],
|
||||
dmarc=["PASS"],
|
||||
format="JSON",
|
||||
name=["string", "string", "string"],
|
||||
spf=["PASS", "NONE", "FAIL"],
|
||||
tls_version=["TLSv1_0", "TLSv1_1", "TLSv1_2"],
|
||||
name=["string"],
|
||||
spf=["PASS"],
|
||||
tls_version=["TLSv1_0"],
|
||||
)
|
||||
assert_matches_type(TimeseriesGroupMaliciousResponse, timeseries_group, path=["response"])
|
||||
|
||||
|
|
@ -683,24 +579,16 @@ class TestAsyncTimeseriesGroups:
|
|||
async def test_method_spam_with_all_params(self, async_client: AsyncCloudflare) -> None:
|
||||
timeseries_group = await async_client.radar.email.security.timeseries_groups.spam(
|
||||
agg_interval="15m",
|
||||
arc=["PASS", "NONE", "FAIL"],
|
||||
date_end=[
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
],
|
||||
date_range=["7d", "7d", "7d"],
|
||||
date_start=[
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
],
|
||||
dkim=["PASS", "NONE", "FAIL"],
|
||||
dmarc=["PASS", "NONE", "FAIL"],
|
||||
arc=["PASS"],
|
||||
date_end=[parse_datetime("2019-12-27T18:11:19.117Z")],
|
||||
date_range=["7d"],
|
||||
date_start=[parse_datetime("2019-12-27T18:11:19.117Z")],
|
||||
dkim=["PASS"],
|
||||
dmarc=["PASS"],
|
||||
format="JSON",
|
||||
name=["string", "string", "string"],
|
||||
spf=["PASS", "NONE", "FAIL"],
|
||||
tls_version=["TLSv1_0", "TLSv1_1", "TLSv1_2"],
|
||||
name=["string"],
|
||||
spf=["PASS"],
|
||||
tls_version=["TLSv1_0"],
|
||||
)
|
||||
assert_matches_type(TimeseriesGroupSpamResponse, timeseries_group, path=["response"])
|
||||
|
||||
|
|
@ -733,23 +621,15 @@ class TestAsyncTimeseriesGroups:
|
|||
async def test_method_spf_with_all_params(self, async_client: AsyncCloudflare) -> None:
|
||||
timeseries_group = await async_client.radar.email.security.timeseries_groups.spf(
|
||||
agg_interval="15m",
|
||||
arc=["PASS", "NONE", "FAIL"],
|
||||
date_end=[
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
],
|
||||
date_range=["7d", "7d", "7d"],
|
||||
date_start=[
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
],
|
||||
dkim=["PASS", "NONE", "FAIL"],
|
||||
dmarc=["PASS", "NONE", "FAIL"],
|
||||
arc=["PASS"],
|
||||
date_end=[parse_datetime("2019-12-27T18:11:19.117Z")],
|
||||
date_range=["7d"],
|
||||
date_start=[parse_datetime("2019-12-27T18:11:19.117Z")],
|
||||
dkim=["PASS"],
|
||||
dmarc=["PASS"],
|
||||
format="JSON",
|
||||
name=["string", "string", "string"],
|
||||
tls_version=["TLSv1_0", "TLSv1_1", "TLSv1_2"],
|
||||
name=["string"],
|
||||
tls_version=["TLSv1_0"],
|
||||
)
|
||||
assert_matches_type(TimeseriesGroupSPFResponse, timeseries_group, path=["response"])
|
||||
|
||||
|
|
@ -782,24 +662,16 @@ class TestAsyncTimeseriesGroups:
|
|||
async def test_method_spoof_with_all_params(self, async_client: AsyncCloudflare) -> None:
|
||||
timeseries_group = await async_client.radar.email.security.timeseries_groups.spoof(
|
||||
agg_interval="15m",
|
||||
arc=["PASS", "NONE", "FAIL"],
|
||||
date_end=[
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
],
|
||||
date_range=["7d", "7d", "7d"],
|
||||
date_start=[
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
],
|
||||
dkim=["PASS", "NONE", "FAIL"],
|
||||
dmarc=["PASS", "NONE", "FAIL"],
|
||||
arc=["PASS"],
|
||||
date_end=[parse_datetime("2019-12-27T18:11:19.117Z")],
|
||||
date_range=["7d"],
|
||||
date_start=[parse_datetime("2019-12-27T18:11:19.117Z")],
|
||||
dkim=["PASS"],
|
||||
dmarc=["PASS"],
|
||||
format="JSON",
|
||||
name=["string", "string", "string"],
|
||||
spf=["PASS", "NONE", "FAIL"],
|
||||
tls_version=["TLSv1_0", "TLSv1_1", "TLSv1_2"],
|
||||
name=["string"],
|
||||
spf=["PASS"],
|
||||
tls_version=["TLSv1_0"],
|
||||
)
|
||||
assert_matches_type(TimeseriesGroupSpoofResponse, timeseries_group, path=["response"])
|
||||
|
||||
|
|
@ -832,24 +704,16 @@ class TestAsyncTimeseriesGroups:
|
|||
async def test_method_threat_category_with_all_params(self, async_client: AsyncCloudflare) -> None:
|
||||
timeseries_group = await async_client.radar.email.security.timeseries_groups.threat_category(
|
||||
agg_interval="15m",
|
||||
arc=["PASS", "NONE", "FAIL"],
|
||||
date_end=[
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
],
|
||||
date_range=["7d", "7d", "7d"],
|
||||
date_start=[
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
],
|
||||
dkim=["PASS", "NONE", "FAIL"],
|
||||
dmarc=["PASS", "NONE", "FAIL"],
|
||||
arc=["PASS"],
|
||||
date_end=[parse_datetime("2019-12-27T18:11:19.117Z")],
|
||||
date_range=["7d"],
|
||||
date_start=[parse_datetime("2019-12-27T18:11:19.117Z")],
|
||||
dkim=["PASS"],
|
||||
dmarc=["PASS"],
|
||||
format="JSON",
|
||||
name=["string", "string", "string"],
|
||||
spf=["PASS", "NONE", "FAIL"],
|
||||
tls_version=["TLSv1_0", "TLSv1_1", "TLSv1_2"],
|
||||
name=["string"],
|
||||
spf=["PASS"],
|
||||
tls_version=["TLSv1_0"],
|
||||
)
|
||||
assert_matches_type(TimeseriesGroupThreatCategoryResponse, timeseries_group, path=["response"])
|
||||
|
||||
|
|
@ -882,23 +746,15 @@ class TestAsyncTimeseriesGroups:
|
|||
async def test_method_tls_version_with_all_params(self, async_client: AsyncCloudflare) -> None:
|
||||
timeseries_group = await async_client.radar.email.security.timeseries_groups.tls_version(
|
||||
agg_interval="15m",
|
||||
arc=["PASS", "NONE", "FAIL"],
|
||||
date_end=[
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
],
|
||||
date_range=["7d", "7d", "7d"],
|
||||
date_start=[
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
],
|
||||
dkim=["PASS", "NONE", "FAIL"],
|
||||
dmarc=["PASS", "NONE", "FAIL"],
|
||||
arc=["PASS"],
|
||||
date_end=[parse_datetime("2019-12-27T18:11:19.117Z")],
|
||||
date_range=["7d"],
|
||||
date_start=[parse_datetime("2019-12-27T18:11:19.117Z")],
|
||||
dkim=["PASS"],
|
||||
dmarc=["PASS"],
|
||||
format="JSON",
|
||||
name=["string", "string", "string"],
|
||||
spf=["PASS", "NONE", "FAIL"],
|
||||
name=["string"],
|
||||
spf=["PASS"],
|
||||
)
|
||||
assert_matches_type(TimeseriesGroupTLSVersionResponse, timeseries_group, path=["response"])
|
||||
|
||||
|
|
|
|||
|
|
@ -26,26 +26,18 @@ class TestTlds:
|
|||
@parametrize
|
||||
def test_method_get_with_all_params(self, client: Cloudflare) -> None:
|
||||
tld = client.radar.email.security.top.tlds.get(
|
||||
arc=["PASS", "NONE", "FAIL"],
|
||||
date_end=[
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
],
|
||||
date_range=["7d", "7d", "7d"],
|
||||
date_start=[
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
],
|
||||
dkim=["PASS", "NONE", "FAIL"],
|
||||
dmarc=["PASS", "NONE", "FAIL"],
|
||||
arc=["PASS"],
|
||||
date_end=[parse_datetime("2019-12-27T18:11:19.117Z")],
|
||||
date_range=["7d"],
|
||||
date_start=[parse_datetime("2019-12-27T18:11:19.117Z")],
|
||||
dkim=["PASS"],
|
||||
dmarc=["PASS"],
|
||||
format="JSON",
|
||||
limit=5,
|
||||
name=["string", "string", "string"],
|
||||
spf=["PASS", "NONE", "FAIL"],
|
||||
name=["string"],
|
||||
spf=["PASS"],
|
||||
tld_category="CLASSIC",
|
||||
tls_version=["TLSv1_0", "TLSv1_1", "TLSv1_2"],
|
||||
tls_version=["TLSv1_0"],
|
||||
)
|
||||
assert_matches_type(TldGetResponse, tld, path=["response"])
|
||||
|
||||
|
|
@ -81,26 +73,18 @@ class TestAsyncTlds:
|
|||
@parametrize
|
||||
async def test_method_get_with_all_params(self, async_client: AsyncCloudflare) -> None:
|
||||
tld = await async_client.radar.email.security.top.tlds.get(
|
||||
arc=["PASS", "NONE", "FAIL"],
|
||||
date_end=[
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
],
|
||||
date_range=["7d", "7d", "7d"],
|
||||
date_start=[
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
],
|
||||
dkim=["PASS", "NONE", "FAIL"],
|
||||
dmarc=["PASS", "NONE", "FAIL"],
|
||||
arc=["PASS"],
|
||||
date_end=[parse_datetime("2019-12-27T18:11:19.117Z")],
|
||||
date_range=["7d"],
|
||||
date_start=[parse_datetime("2019-12-27T18:11:19.117Z")],
|
||||
dkim=["PASS"],
|
||||
dmarc=["PASS"],
|
||||
format="JSON",
|
||||
limit=5,
|
||||
name=["string", "string", "string"],
|
||||
spf=["PASS", "NONE", "FAIL"],
|
||||
name=["string"],
|
||||
spf=["PASS"],
|
||||
tld_category="CLASSIC",
|
||||
tls_version=["TLSv1_0", "TLSv1_1", "TLSv1_2"],
|
||||
tls_version=["TLSv1_0"],
|
||||
)
|
||||
assert_matches_type(TldGetResponse, tld, path=["response"])
|
||||
|
||||
|
|
|
|||
|
|
@ -29,26 +29,18 @@ class TestMalicious:
|
|||
def test_method_get_with_all_params(self, client: Cloudflare) -> None:
|
||||
malicious = client.radar.email.security.top.tlds.malicious.get(
|
||||
malicious="MALICIOUS",
|
||||
arc=["PASS", "NONE", "FAIL"],
|
||||
date_end=[
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
],
|
||||
date_range=["7d", "7d", "7d"],
|
||||
date_start=[
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
],
|
||||
dkim=["PASS", "NONE", "FAIL"],
|
||||
dmarc=["PASS", "NONE", "FAIL"],
|
||||
arc=["PASS"],
|
||||
date_end=[parse_datetime("2019-12-27T18:11:19.117Z")],
|
||||
date_range=["7d"],
|
||||
date_start=[parse_datetime("2019-12-27T18:11:19.117Z")],
|
||||
dkim=["PASS"],
|
||||
dmarc=["PASS"],
|
||||
format="JSON",
|
||||
limit=5,
|
||||
name=["string", "string", "string"],
|
||||
spf=["PASS", "NONE", "FAIL"],
|
||||
name=["string"],
|
||||
spf=["PASS"],
|
||||
tld_category="CLASSIC",
|
||||
tls_version=["TLSv1_0", "TLSv1_1", "TLSv1_2"],
|
||||
tls_version=["TLSv1_0"],
|
||||
)
|
||||
assert_matches_type(MaliciousGetResponse, malicious, path=["response"])
|
||||
|
||||
|
|
@ -91,26 +83,18 @@ class TestAsyncMalicious:
|
|||
async def test_method_get_with_all_params(self, async_client: AsyncCloudflare) -> None:
|
||||
malicious = await async_client.radar.email.security.top.tlds.malicious.get(
|
||||
malicious="MALICIOUS",
|
||||
arc=["PASS", "NONE", "FAIL"],
|
||||
date_end=[
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
],
|
||||
date_range=["7d", "7d", "7d"],
|
||||
date_start=[
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
],
|
||||
dkim=["PASS", "NONE", "FAIL"],
|
||||
dmarc=["PASS", "NONE", "FAIL"],
|
||||
arc=["PASS"],
|
||||
date_end=[parse_datetime("2019-12-27T18:11:19.117Z")],
|
||||
date_range=["7d"],
|
||||
date_start=[parse_datetime("2019-12-27T18:11:19.117Z")],
|
||||
dkim=["PASS"],
|
||||
dmarc=["PASS"],
|
||||
format="JSON",
|
||||
limit=5,
|
||||
name=["string", "string", "string"],
|
||||
spf=["PASS", "NONE", "FAIL"],
|
||||
name=["string"],
|
||||
spf=["PASS"],
|
||||
tld_category="CLASSIC",
|
||||
tls_version=["TLSv1_0", "TLSv1_1", "TLSv1_2"],
|
||||
tls_version=["TLSv1_0"],
|
||||
)
|
||||
assert_matches_type(MaliciousGetResponse, malicious, path=["response"])
|
||||
|
||||
|
|
|
|||
|
|
@ -29,26 +29,18 @@ class TestSpam:
|
|||
def test_method_get_with_all_params(self, client: Cloudflare) -> None:
|
||||
spam = client.radar.email.security.top.tlds.spam.get(
|
||||
spam="SPAM",
|
||||
arc=["PASS", "NONE", "FAIL"],
|
||||
date_end=[
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
],
|
||||
date_range=["7d", "7d", "7d"],
|
||||
date_start=[
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
],
|
||||
dkim=["PASS", "NONE", "FAIL"],
|
||||
dmarc=["PASS", "NONE", "FAIL"],
|
||||
arc=["PASS"],
|
||||
date_end=[parse_datetime("2019-12-27T18:11:19.117Z")],
|
||||
date_range=["7d"],
|
||||
date_start=[parse_datetime("2019-12-27T18:11:19.117Z")],
|
||||
dkim=["PASS"],
|
||||
dmarc=["PASS"],
|
||||
format="JSON",
|
||||
limit=5,
|
||||
name=["string", "string", "string"],
|
||||
spf=["PASS", "NONE", "FAIL"],
|
||||
name=["string"],
|
||||
spf=["PASS"],
|
||||
tld_category="CLASSIC",
|
||||
tls_version=["TLSv1_0", "TLSv1_1", "TLSv1_2"],
|
||||
tls_version=["TLSv1_0"],
|
||||
)
|
||||
assert_matches_type(SpamGetResponse, spam, path=["response"])
|
||||
|
||||
|
|
@ -91,26 +83,18 @@ class TestAsyncSpam:
|
|||
async def test_method_get_with_all_params(self, async_client: AsyncCloudflare) -> None:
|
||||
spam = await async_client.radar.email.security.top.tlds.spam.get(
|
||||
spam="SPAM",
|
||||
arc=["PASS", "NONE", "FAIL"],
|
||||
date_end=[
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
],
|
||||
date_range=["7d", "7d", "7d"],
|
||||
date_start=[
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
],
|
||||
dkim=["PASS", "NONE", "FAIL"],
|
||||
dmarc=["PASS", "NONE", "FAIL"],
|
||||
arc=["PASS"],
|
||||
date_end=[parse_datetime("2019-12-27T18:11:19.117Z")],
|
||||
date_range=["7d"],
|
||||
date_start=[parse_datetime("2019-12-27T18:11:19.117Z")],
|
||||
dkim=["PASS"],
|
||||
dmarc=["PASS"],
|
||||
format="JSON",
|
||||
limit=5,
|
||||
name=["string", "string", "string"],
|
||||
spf=["PASS", "NONE", "FAIL"],
|
||||
name=["string"],
|
||||
spf=["PASS"],
|
||||
tld_category="CLASSIC",
|
||||
tls_version=["TLSv1_0", "TLSv1_1", "TLSv1_2"],
|
||||
tls_version=["TLSv1_0"],
|
||||
)
|
||||
assert_matches_type(SpamGetResponse, spam, path=["response"])
|
||||
|
||||
|
|
|
|||
|
|
@ -29,26 +29,18 @@ class TestSpoof:
|
|||
def test_method_get_with_all_params(self, client: Cloudflare) -> None:
|
||||
spoof = client.radar.email.security.top.tlds.spoof.get(
|
||||
spoof="SPOOF",
|
||||
arc=["PASS", "NONE", "FAIL"],
|
||||
date_end=[
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
],
|
||||
date_range=["7d", "7d", "7d"],
|
||||
date_start=[
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
],
|
||||
dkim=["PASS", "NONE", "FAIL"],
|
||||
dmarc=["PASS", "NONE", "FAIL"],
|
||||
arc=["PASS"],
|
||||
date_end=[parse_datetime("2019-12-27T18:11:19.117Z")],
|
||||
date_range=["7d"],
|
||||
date_start=[parse_datetime("2019-12-27T18:11:19.117Z")],
|
||||
dkim=["PASS"],
|
||||
dmarc=["PASS"],
|
||||
format="JSON",
|
||||
limit=5,
|
||||
name=["string", "string", "string"],
|
||||
spf=["PASS", "NONE", "FAIL"],
|
||||
name=["string"],
|
||||
spf=["PASS"],
|
||||
tld_category="CLASSIC",
|
||||
tls_version=["TLSv1_0", "TLSv1_1", "TLSv1_2"],
|
||||
tls_version=["TLSv1_0"],
|
||||
)
|
||||
assert_matches_type(SpoofGetResponse, spoof, path=["response"])
|
||||
|
||||
|
|
@ -91,26 +83,18 @@ class TestAsyncSpoof:
|
|||
async def test_method_get_with_all_params(self, async_client: AsyncCloudflare) -> None:
|
||||
spoof = await async_client.radar.email.security.top.tlds.spoof.get(
|
||||
spoof="SPOOF",
|
||||
arc=["PASS", "NONE", "FAIL"],
|
||||
date_end=[
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
],
|
||||
date_range=["7d", "7d", "7d"],
|
||||
date_start=[
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
],
|
||||
dkim=["PASS", "NONE", "FAIL"],
|
||||
dmarc=["PASS", "NONE", "FAIL"],
|
||||
arc=["PASS"],
|
||||
date_end=[parse_datetime("2019-12-27T18:11:19.117Z")],
|
||||
date_range=["7d"],
|
||||
date_start=[parse_datetime("2019-12-27T18:11:19.117Z")],
|
||||
dkim=["PASS"],
|
||||
dmarc=["PASS"],
|
||||
format="JSON",
|
||||
limit=5,
|
||||
name=["string", "string", "string"],
|
||||
spf=["PASS", "NONE", "FAIL"],
|
||||
name=["string"],
|
||||
spf=["PASS"],
|
||||
tld_category="CLASSIC",
|
||||
tls_version=["TLSv1_0", "TLSv1_1", "TLSv1_2"],
|
||||
tls_version=["TLSv1_0"],
|
||||
)
|
||||
assert_matches_type(SpoofGetResponse, spoof, path=["response"])
|
||||
|
||||
|
|
|
|||
|
|
@ -29,30 +29,22 @@ class TestBotClass:
|
|||
def test_method_get_with_all_params(self, client: Cloudflare) -> None:
|
||||
bot_class = client.radar.http.ases.bot_class.get(
|
||||
bot_class="LIKELY_AUTOMATED",
|
||||
asn=["string", "string", "string"],
|
||||
browser_family=["CHROME", "EDGE", "FIREFOX"],
|
||||
continent=["string", "string", "string"],
|
||||
date_end=[
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
],
|
||||
date_range=["7d", "7d", "7d"],
|
||||
date_start=[
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
],
|
||||
device_type=["DESKTOP", "MOBILE", "OTHER"],
|
||||
asn=["string"],
|
||||
browser_family=["CHROME"],
|
||||
continent=["string"],
|
||||
date_end=[parse_datetime("2019-12-27T18:11:19.117Z")],
|
||||
date_range=["7d"],
|
||||
date_start=[parse_datetime("2019-12-27T18:11:19.117Z")],
|
||||
device_type=["DESKTOP"],
|
||||
format="JSON",
|
||||
http_protocol=["HTTP", "HTTPS"],
|
||||
http_version=["HTTPv1", "HTTPv2", "HTTPv3"],
|
||||
ip_version=["IPv4", "IPv6"],
|
||||
http_protocol=["HTTP"],
|
||||
http_version=["HTTPv1"],
|
||||
ip_version=["IPv4"],
|
||||
limit=5,
|
||||
location=["string", "string", "string"],
|
||||
name=["string", "string", "string"],
|
||||
os=["WINDOWS", "MACOSX", "IOS"],
|
||||
tls_version=["TLSv1_0", "TLSv1_1", "TLSv1_2"],
|
||||
location=["string"],
|
||||
name=["string"],
|
||||
os=["WINDOWS"],
|
||||
tls_version=["TLSv1_0"],
|
||||
)
|
||||
assert_matches_type(BotClassGetResponse, bot_class, path=["response"])
|
||||
|
||||
|
|
@ -95,30 +87,22 @@ class TestAsyncBotClass:
|
|||
async def test_method_get_with_all_params(self, async_client: AsyncCloudflare) -> None:
|
||||
bot_class = await async_client.radar.http.ases.bot_class.get(
|
||||
bot_class="LIKELY_AUTOMATED",
|
||||
asn=["string", "string", "string"],
|
||||
browser_family=["CHROME", "EDGE", "FIREFOX"],
|
||||
continent=["string", "string", "string"],
|
||||
date_end=[
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
],
|
||||
date_range=["7d", "7d", "7d"],
|
||||
date_start=[
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
],
|
||||
device_type=["DESKTOP", "MOBILE", "OTHER"],
|
||||
asn=["string"],
|
||||
browser_family=["CHROME"],
|
||||
continent=["string"],
|
||||
date_end=[parse_datetime("2019-12-27T18:11:19.117Z")],
|
||||
date_range=["7d"],
|
||||
date_start=[parse_datetime("2019-12-27T18:11:19.117Z")],
|
||||
device_type=["DESKTOP"],
|
||||
format="JSON",
|
||||
http_protocol=["HTTP", "HTTPS"],
|
||||
http_version=["HTTPv1", "HTTPv2", "HTTPv3"],
|
||||
ip_version=["IPv4", "IPv6"],
|
||||
http_protocol=["HTTP"],
|
||||
http_version=["HTTPv1"],
|
||||
ip_version=["IPv4"],
|
||||
limit=5,
|
||||
location=["string", "string", "string"],
|
||||
name=["string", "string", "string"],
|
||||
os=["WINDOWS", "MACOSX", "IOS"],
|
||||
tls_version=["TLSv1_0", "TLSv1_1", "TLSv1_2"],
|
||||
location=["string"],
|
||||
name=["string"],
|
||||
os=["WINDOWS"],
|
||||
tls_version=["TLSv1_0"],
|
||||
)
|
||||
assert_matches_type(BotClassGetResponse, bot_class, path=["response"])
|
||||
|
||||
|
|
|
|||
|
|
@ -29,30 +29,22 @@ class TestBrowserFamily:
|
|||
def test_method_get_with_all_params(self, client: Cloudflare) -> None:
|
||||
browser_family = client.radar.http.ases.browser_family.get(
|
||||
browser_family="CHROME",
|
||||
asn=["string", "string", "string"],
|
||||
bot_class=["LIKELY_AUTOMATED", "LIKELY_HUMAN"],
|
||||
continent=["string", "string", "string"],
|
||||
date_end=[
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
],
|
||||
date_range=["7d", "7d", "7d"],
|
||||
date_start=[
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
],
|
||||
device_type=["DESKTOP", "MOBILE", "OTHER"],
|
||||
asn=["string"],
|
||||
bot_class=["LIKELY_AUTOMATED"],
|
||||
continent=["string"],
|
||||
date_end=[parse_datetime("2019-12-27T18:11:19.117Z")],
|
||||
date_range=["7d"],
|
||||
date_start=[parse_datetime("2019-12-27T18:11:19.117Z")],
|
||||
device_type=["DESKTOP"],
|
||||
format="JSON",
|
||||
http_protocol=["HTTP", "HTTPS"],
|
||||
http_version=["HTTPv1", "HTTPv2", "HTTPv3"],
|
||||
ip_version=["IPv4", "IPv6"],
|
||||
http_protocol=["HTTP"],
|
||||
http_version=["HTTPv1"],
|
||||
ip_version=["IPv4"],
|
||||
limit=5,
|
||||
location=["string", "string", "string"],
|
||||
name=["string", "string", "string"],
|
||||
os=["WINDOWS", "MACOSX", "IOS"],
|
||||
tls_version=["TLSv1_0", "TLSv1_1", "TLSv1_2"],
|
||||
location=["string"],
|
||||
name=["string"],
|
||||
os=["WINDOWS"],
|
||||
tls_version=["TLSv1_0"],
|
||||
)
|
||||
assert_matches_type(BrowserFamilyGetResponse, browser_family, path=["response"])
|
||||
|
||||
|
|
@ -95,30 +87,22 @@ class TestAsyncBrowserFamily:
|
|||
async def test_method_get_with_all_params(self, async_client: AsyncCloudflare) -> None:
|
||||
browser_family = await async_client.radar.http.ases.browser_family.get(
|
||||
browser_family="CHROME",
|
||||
asn=["string", "string", "string"],
|
||||
bot_class=["LIKELY_AUTOMATED", "LIKELY_HUMAN"],
|
||||
continent=["string", "string", "string"],
|
||||
date_end=[
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
],
|
||||
date_range=["7d", "7d", "7d"],
|
||||
date_start=[
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
],
|
||||
device_type=["DESKTOP", "MOBILE", "OTHER"],
|
||||
asn=["string"],
|
||||
bot_class=["LIKELY_AUTOMATED"],
|
||||
continent=["string"],
|
||||
date_end=[parse_datetime("2019-12-27T18:11:19.117Z")],
|
||||
date_range=["7d"],
|
||||
date_start=[parse_datetime("2019-12-27T18:11:19.117Z")],
|
||||
device_type=["DESKTOP"],
|
||||
format="JSON",
|
||||
http_protocol=["HTTP", "HTTPS"],
|
||||
http_version=["HTTPv1", "HTTPv2", "HTTPv3"],
|
||||
ip_version=["IPv4", "IPv6"],
|
||||
http_protocol=["HTTP"],
|
||||
http_version=["HTTPv1"],
|
||||
ip_version=["IPv4"],
|
||||
limit=5,
|
||||
location=["string", "string", "string"],
|
||||
name=["string", "string", "string"],
|
||||
os=["WINDOWS", "MACOSX", "IOS"],
|
||||
tls_version=["TLSv1_0", "TLSv1_1", "TLSv1_2"],
|
||||
location=["string"],
|
||||
name=["string"],
|
||||
os=["WINDOWS"],
|
||||
tls_version=["TLSv1_0"],
|
||||
)
|
||||
assert_matches_type(BrowserFamilyGetResponse, browser_family, path=["response"])
|
||||
|
||||
|
|
|
|||
|
|
@ -29,30 +29,22 @@ class TestDeviceType:
|
|||
def test_method_get_with_all_params(self, client: Cloudflare) -> None:
|
||||
device_type = client.radar.http.ases.device_type.get(
|
||||
device_type="DESKTOP",
|
||||
asn=["string", "string", "string"],
|
||||
bot_class=["LIKELY_AUTOMATED", "LIKELY_HUMAN"],
|
||||
browser_family=["CHROME", "EDGE", "FIREFOX"],
|
||||
continent=["string", "string", "string"],
|
||||
date_end=[
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
],
|
||||
date_range=["7d", "7d", "7d"],
|
||||
date_start=[
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
],
|
||||
asn=["string"],
|
||||
bot_class=["LIKELY_AUTOMATED"],
|
||||
browser_family=["CHROME"],
|
||||
continent=["string"],
|
||||
date_end=[parse_datetime("2019-12-27T18:11:19.117Z")],
|
||||
date_range=["7d"],
|
||||
date_start=[parse_datetime("2019-12-27T18:11:19.117Z")],
|
||||
format="JSON",
|
||||
http_protocol=["HTTP", "HTTPS"],
|
||||
http_version=["HTTPv1", "HTTPv2", "HTTPv3"],
|
||||
ip_version=["IPv4", "IPv6"],
|
||||
http_protocol=["HTTP"],
|
||||
http_version=["HTTPv1"],
|
||||
ip_version=["IPv4"],
|
||||
limit=5,
|
||||
location=["string", "string", "string"],
|
||||
name=["string", "string", "string"],
|
||||
os=["WINDOWS", "MACOSX", "IOS"],
|
||||
tls_version=["TLSv1_0", "TLSv1_1", "TLSv1_2"],
|
||||
location=["string"],
|
||||
name=["string"],
|
||||
os=["WINDOWS"],
|
||||
tls_version=["TLSv1_0"],
|
||||
)
|
||||
assert_matches_type(DeviceTypeGetResponse, device_type, path=["response"])
|
||||
|
||||
|
|
@ -95,30 +87,22 @@ class TestAsyncDeviceType:
|
|||
async def test_method_get_with_all_params(self, async_client: AsyncCloudflare) -> None:
|
||||
device_type = await async_client.radar.http.ases.device_type.get(
|
||||
device_type="DESKTOP",
|
||||
asn=["string", "string", "string"],
|
||||
bot_class=["LIKELY_AUTOMATED", "LIKELY_HUMAN"],
|
||||
browser_family=["CHROME", "EDGE", "FIREFOX"],
|
||||
continent=["string", "string", "string"],
|
||||
date_end=[
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
],
|
||||
date_range=["7d", "7d", "7d"],
|
||||
date_start=[
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
],
|
||||
asn=["string"],
|
||||
bot_class=["LIKELY_AUTOMATED"],
|
||||
browser_family=["CHROME"],
|
||||
continent=["string"],
|
||||
date_end=[parse_datetime("2019-12-27T18:11:19.117Z")],
|
||||
date_range=["7d"],
|
||||
date_start=[parse_datetime("2019-12-27T18:11:19.117Z")],
|
||||
format="JSON",
|
||||
http_protocol=["HTTP", "HTTPS"],
|
||||
http_version=["HTTPv1", "HTTPv2", "HTTPv3"],
|
||||
ip_version=["IPv4", "IPv6"],
|
||||
http_protocol=["HTTP"],
|
||||
http_version=["HTTPv1"],
|
||||
ip_version=["IPv4"],
|
||||
limit=5,
|
||||
location=["string", "string", "string"],
|
||||
name=["string", "string", "string"],
|
||||
os=["WINDOWS", "MACOSX", "IOS"],
|
||||
tls_version=["TLSv1_0", "TLSv1_1", "TLSv1_2"],
|
||||
location=["string"],
|
||||
name=["string"],
|
||||
os=["WINDOWS"],
|
||||
tls_version=["TLSv1_0"],
|
||||
)
|
||||
assert_matches_type(DeviceTypeGetResponse, device_type, path=["response"])
|
||||
|
||||
|
|
|
|||
|
|
@ -29,30 +29,22 @@ class TestHTTPMethod:
|
|||
def test_method_get_with_all_params(self, client: Cloudflare) -> None:
|
||||
http_method = client.radar.http.ases.http_method.get(
|
||||
http_version="HTTPv1",
|
||||
asn=["string", "string", "string"],
|
||||
bot_class=["LIKELY_AUTOMATED", "LIKELY_HUMAN"],
|
||||
browser_family=["CHROME", "EDGE", "FIREFOX"],
|
||||
continent=["string", "string", "string"],
|
||||
date_end=[
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
],
|
||||
date_range=["7d", "7d", "7d"],
|
||||
date_start=[
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
],
|
||||
device_type=["DESKTOP", "MOBILE", "OTHER"],
|
||||
asn=["string"],
|
||||
bot_class=["LIKELY_AUTOMATED"],
|
||||
browser_family=["CHROME"],
|
||||
continent=["string"],
|
||||
date_end=[parse_datetime("2019-12-27T18:11:19.117Z")],
|
||||
date_range=["7d"],
|
||||
date_start=[parse_datetime("2019-12-27T18:11:19.117Z")],
|
||||
device_type=["DESKTOP"],
|
||||
format="JSON",
|
||||
http_protocol=["HTTP", "HTTPS"],
|
||||
ip_version=["IPv4", "IPv6"],
|
||||
http_protocol=["HTTP"],
|
||||
ip_version=["IPv4"],
|
||||
limit=5,
|
||||
location=["string", "string", "string"],
|
||||
name=["string", "string", "string"],
|
||||
os=["WINDOWS", "MACOSX", "IOS"],
|
||||
tls_version=["TLSv1_0", "TLSv1_1", "TLSv1_2"],
|
||||
location=["string"],
|
||||
name=["string"],
|
||||
os=["WINDOWS"],
|
||||
tls_version=["TLSv1_0"],
|
||||
)
|
||||
assert_matches_type(HTTPMethodGetResponse, http_method, path=["response"])
|
||||
|
||||
|
|
@ -95,30 +87,22 @@ class TestAsyncHTTPMethod:
|
|||
async def test_method_get_with_all_params(self, async_client: AsyncCloudflare) -> None:
|
||||
http_method = await async_client.radar.http.ases.http_method.get(
|
||||
http_version="HTTPv1",
|
||||
asn=["string", "string", "string"],
|
||||
bot_class=["LIKELY_AUTOMATED", "LIKELY_HUMAN"],
|
||||
browser_family=["CHROME", "EDGE", "FIREFOX"],
|
||||
continent=["string", "string", "string"],
|
||||
date_end=[
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
],
|
||||
date_range=["7d", "7d", "7d"],
|
||||
date_start=[
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
],
|
||||
device_type=["DESKTOP", "MOBILE", "OTHER"],
|
||||
asn=["string"],
|
||||
bot_class=["LIKELY_AUTOMATED"],
|
||||
browser_family=["CHROME"],
|
||||
continent=["string"],
|
||||
date_end=[parse_datetime("2019-12-27T18:11:19.117Z")],
|
||||
date_range=["7d"],
|
||||
date_start=[parse_datetime("2019-12-27T18:11:19.117Z")],
|
||||
device_type=["DESKTOP"],
|
||||
format="JSON",
|
||||
http_protocol=["HTTP", "HTTPS"],
|
||||
ip_version=["IPv4", "IPv6"],
|
||||
http_protocol=["HTTP"],
|
||||
ip_version=["IPv4"],
|
||||
limit=5,
|
||||
location=["string", "string", "string"],
|
||||
name=["string", "string", "string"],
|
||||
os=["WINDOWS", "MACOSX", "IOS"],
|
||||
tls_version=["TLSv1_0", "TLSv1_1", "TLSv1_2"],
|
||||
location=["string"],
|
||||
name=["string"],
|
||||
os=["WINDOWS"],
|
||||
tls_version=["TLSv1_0"],
|
||||
)
|
||||
assert_matches_type(HTTPMethodGetResponse, http_method, path=["response"])
|
||||
|
||||
|
|
|
|||
|
|
@ -29,29 +29,21 @@ class TestHTTPProtocol:
|
|||
def test_method_get_with_all_params(self, client: Cloudflare) -> None:
|
||||
http_protocol = client.radar.http.ases.http_protocol.get(
|
||||
http_protocol="HTTP",
|
||||
asn=["string", "string", "string"],
|
||||
bot_class=["LIKELY_AUTOMATED", "LIKELY_HUMAN"],
|
||||
browser_family=["CHROME", "EDGE", "FIREFOX"],
|
||||
continent=["string", "string", "string"],
|
||||
date_end=[
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
],
|
||||
date_range=["7d", "7d", "7d"],
|
||||
date_start=[
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
],
|
||||
device_type=["DESKTOP", "MOBILE", "OTHER"],
|
||||
asn=["string"],
|
||||
bot_class=["LIKELY_AUTOMATED"],
|
||||
browser_family=["CHROME"],
|
||||
continent=["string"],
|
||||
date_end=[parse_datetime("2019-12-27T18:11:19.117Z")],
|
||||
date_range=["7d"],
|
||||
date_start=[parse_datetime("2019-12-27T18:11:19.117Z")],
|
||||
device_type=["DESKTOP"],
|
||||
format="JSON",
|
||||
ip_version=["IPv4", "IPv6"],
|
||||
ip_version=["IPv4"],
|
||||
limit=5,
|
||||
location=["string", "string", "string"],
|
||||
name=["string", "string", "string"],
|
||||
os=["WINDOWS", "MACOSX", "IOS"],
|
||||
tls_version=["TLSv1_0", "TLSv1_1", "TLSv1_2"],
|
||||
location=["string"],
|
||||
name=["string"],
|
||||
os=["WINDOWS"],
|
||||
tls_version=["TLSv1_0"],
|
||||
)
|
||||
assert_matches_type(HTTPProtocolGetResponse, http_protocol, path=["response"])
|
||||
|
||||
|
|
@ -94,29 +86,21 @@ class TestAsyncHTTPProtocol:
|
|||
async def test_method_get_with_all_params(self, async_client: AsyncCloudflare) -> None:
|
||||
http_protocol = await async_client.radar.http.ases.http_protocol.get(
|
||||
http_protocol="HTTP",
|
||||
asn=["string", "string", "string"],
|
||||
bot_class=["LIKELY_AUTOMATED", "LIKELY_HUMAN"],
|
||||
browser_family=["CHROME", "EDGE", "FIREFOX"],
|
||||
continent=["string", "string", "string"],
|
||||
date_end=[
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
],
|
||||
date_range=["7d", "7d", "7d"],
|
||||
date_start=[
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
],
|
||||
device_type=["DESKTOP", "MOBILE", "OTHER"],
|
||||
asn=["string"],
|
||||
bot_class=["LIKELY_AUTOMATED"],
|
||||
browser_family=["CHROME"],
|
||||
continent=["string"],
|
||||
date_end=[parse_datetime("2019-12-27T18:11:19.117Z")],
|
||||
date_range=["7d"],
|
||||
date_start=[parse_datetime("2019-12-27T18:11:19.117Z")],
|
||||
device_type=["DESKTOP"],
|
||||
format="JSON",
|
||||
ip_version=["IPv4", "IPv6"],
|
||||
ip_version=["IPv4"],
|
||||
limit=5,
|
||||
location=["string", "string", "string"],
|
||||
name=["string", "string", "string"],
|
||||
os=["WINDOWS", "MACOSX", "IOS"],
|
||||
tls_version=["TLSv1_0", "TLSv1_1", "TLSv1_2"],
|
||||
location=["string"],
|
||||
name=["string"],
|
||||
os=["WINDOWS"],
|
||||
tls_version=["TLSv1_0"],
|
||||
)
|
||||
assert_matches_type(HTTPProtocolGetResponse, http_protocol, path=["response"])
|
||||
|
||||
|
|
|
|||
|
|
@ -29,30 +29,22 @@ class TestIPVersion:
|
|||
def test_method_get_with_all_params(self, client: Cloudflare) -> None:
|
||||
ip_version = client.radar.http.ases.ip_version.get(
|
||||
ip_version="IPv4",
|
||||
asn=["string", "string", "string"],
|
||||
bot_class=["LIKELY_AUTOMATED", "LIKELY_HUMAN"],
|
||||
browser_family=["CHROME", "EDGE", "FIREFOX"],
|
||||
continent=["string", "string", "string"],
|
||||
date_end=[
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
],
|
||||
date_range=["7d", "7d", "7d"],
|
||||
date_start=[
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
],
|
||||
device_type=["DESKTOP", "MOBILE", "OTHER"],
|
||||
asn=["string"],
|
||||
bot_class=["LIKELY_AUTOMATED"],
|
||||
browser_family=["CHROME"],
|
||||
continent=["string"],
|
||||
date_end=[parse_datetime("2019-12-27T18:11:19.117Z")],
|
||||
date_range=["7d"],
|
||||
date_start=[parse_datetime("2019-12-27T18:11:19.117Z")],
|
||||
device_type=["DESKTOP"],
|
||||
format="JSON",
|
||||
http_protocol=["HTTP", "HTTPS"],
|
||||
http_version=["HTTPv1", "HTTPv2", "HTTPv3"],
|
||||
http_protocol=["HTTP"],
|
||||
http_version=["HTTPv1"],
|
||||
limit=5,
|
||||
location=["string", "string", "string"],
|
||||
name=["string", "string", "string"],
|
||||
os=["WINDOWS", "MACOSX", "IOS"],
|
||||
tls_version=["TLSv1_0", "TLSv1_1", "TLSv1_2"],
|
||||
location=["string"],
|
||||
name=["string"],
|
||||
os=["WINDOWS"],
|
||||
tls_version=["TLSv1_0"],
|
||||
)
|
||||
assert_matches_type(IPVersionGetResponse, ip_version, path=["response"])
|
||||
|
||||
|
|
@ -95,30 +87,22 @@ class TestAsyncIPVersion:
|
|||
async def test_method_get_with_all_params(self, async_client: AsyncCloudflare) -> None:
|
||||
ip_version = await async_client.radar.http.ases.ip_version.get(
|
||||
ip_version="IPv4",
|
||||
asn=["string", "string", "string"],
|
||||
bot_class=["LIKELY_AUTOMATED", "LIKELY_HUMAN"],
|
||||
browser_family=["CHROME", "EDGE", "FIREFOX"],
|
||||
continent=["string", "string", "string"],
|
||||
date_end=[
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
],
|
||||
date_range=["7d", "7d", "7d"],
|
||||
date_start=[
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
],
|
||||
device_type=["DESKTOP", "MOBILE", "OTHER"],
|
||||
asn=["string"],
|
||||
bot_class=["LIKELY_AUTOMATED"],
|
||||
browser_family=["CHROME"],
|
||||
continent=["string"],
|
||||
date_end=[parse_datetime("2019-12-27T18:11:19.117Z")],
|
||||
date_range=["7d"],
|
||||
date_start=[parse_datetime("2019-12-27T18:11:19.117Z")],
|
||||
device_type=["DESKTOP"],
|
||||
format="JSON",
|
||||
http_protocol=["HTTP", "HTTPS"],
|
||||
http_version=["HTTPv1", "HTTPv2", "HTTPv3"],
|
||||
http_protocol=["HTTP"],
|
||||
http_version=["HTTPv1"],
|
||||
limit=5,
|
||||
location=["string", "string", "string"],
|
||||
name=["string", "string", "string"],
|
||||
os=["WINDOWS", "MACOSX", "IOS"],
|
||||
tls_version=["TLSv1_0", "TLSv1_1", "TLSv1_2"],
|
||||
location=["string"],
|
||||
name=["string"],
|
||||
os=["WINDOWS"],
|
||||
tls_version=["TLSv1_0"],
|
||||
)
|
||||
assert_matches_type(IPVersionGetResponse, ip_version, path=["response"])
|
||||
|
||||
|
|
|
|||
|
|
@ -29,30 +29,22 @@ class TestOS:
|
|||
def test_method_get_with_all_params(self, client: Cloudflare) -> None:
|
||||
os = client.radar.http.ases.os.get(
|
||||
os="WINDOWS",
|
||||
asn=["string", "string", "string"],
|
||||
bot_class=["LIKELY_AUTOMATED", "LIKELY_HUMAN"],
|
||||
browser_family=["CHROME", "EDGE", "FIREFOX"],
|
||||
continent=["string", "string", "string"],
|
||||
date_end=[
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
],
|
||||
date_range=["7d", "7d", "7d"],
|
||||
date_start=[
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
],
|
||||
device_type=["DESKTOP", "MOBILE", "OTHER"],
|
||||
asn=["string"],
|
||||
bot_class=["LIKELY_AUTOMATED"],
|
||||
browser_family=["CHROME"],
|
||||
continent=["string"],
|
||||
date_end=[parse_datetime("2019-12-27T18:11:19.117Z")],
|
||||
date_range=["7d"],
|
||||
date_start=[parse_datetime("2019-12-27T18:11:19.117Z")],
|
||||
device_type=["DESKTOP"],
|
||||
format="JSON",
|
||||
http_protocol=["HTTP", "HTTPS"],
|
||||
http_version=["HTTPv1", "HTTPv2", "HTTPv3"],
|
||||
ip_version=["IPv4", "IPv6"],
|
||||
http_protocol=["HTTP"],
|
||||
http_version=["HTTPv1"],
|
||||
ip_version=["IPv4"],
|
||||
limit=5,
|
||||
location=["string", "string", "string"],
|
||||
name=["string", "string", "string"],
|
||||
tls_version=["TLSv1_0", "TLSv1_1", "TLSv1_2"],
|
||||
location=["string"],
|
||||
name=["string"],
|
||||
tls_version=["TLSv1_0"],
|
||||
)
|
||||
assert_matches_type(OSGetResponse, os, path=["response"])
|
||||
|
||||
|
|
@ -95,30 +87,22 @@ class TestAsyncOS:
|
|||
async def test_method_get_with_all_params(self, async_client: AsyncCloudflare) -> None:
|
||||
os = await async_client.radar.http.ases.os.get(
|
||||
os="WINDOWS",
|
||||
asn=["string", "string", "string"],
|
||||
bot_class=["LIKELY_AUTOMATED", "LIKELY_HUMAN"],
|
||||
browser_family=["CHROME", "EDGE", "FIREFOX"],
|
||||
continent=["string", "string", "string"],
|
||||
date_end=[
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
],
|
||||
date_range=["7d", "7d", "7d"],
|
||||
date_start=[
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
],
|
||||
device_type=["DESKTOP", "MOBILE", "OTHER"],
|
||||
asn=["string"],
|
||||
bot_class=["LIKELY_AUTOMATED"],
|
||||
browser_family=["CHROME"],
|
||||
continent=["string"],
|
||||
date_end=[parse_datetime("2019-12-27T18:11:19.117Z")],
|
||||
date_range=["7d"],
|
||||
date_start=[parse_datetime("2019-12-27T18:11:19.117Z")],
|
||||
device_type=["DESKTOP"],
|
||||
format="JSON",
|
||||
http_protocol=["HTTP", "HTTPS"],
|
||||
http_version=["HTTPv1", "HTTPv2", "HTTPv3"],
|
||||
ip_version=["IPv4", "IPv6"],
|
||||
http_protocol=["HTTP"],
|
||||
http_version=["HTTPv1"],
|
||||
ip_version=["IPv4"],
|
||||
limit=5,
|
||||
location=["string", "string", "string"],
|
||||
name=["string", "string", "string"],
|
||||
tls_version=["TLSv1_0", "TLSv1_1", "TLSv1_2"],
|
||||
location=["string"],
|
||||
name=["string"],
|
||||
tls_version=["TLSv1_0"],
|
||||
)
|
||||
assert_matches_type(OSGetResponse, os, path=["response"])
|
||||
|
||||
|
|
|
|||
|
|
@ -29,30 +29,22 @@ class TestTLSVersion:
|
|||
def test_method_get_with_all_params(self, client: Cloudflare) -> None:
|
||||
tls_version = client.radar.http.ases.tls_version.get(
|
||||
tls_version="TLSv1_0",
|
||||
asn=["string", "string", "string"],
|
||||
bot_class=["LIKELY_AUTOMATED", "LIKELY_HUMAN"],
|
||||
browser_family=["CHROME", "EDGE", "FIREFOX"],
|
||||
continent=["string", "string", "string"],
|
||||
date_end=[
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
],
|
||||
date_range=["7d", "7d", "7d"],
|
||||
date_start=[
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
],
|
||||
device_type=["DESKTOP", "MOBILE", "OTHER"],
|
||||
asn=["string"],
|
||||
bot_class=["LIKELY_AUTOMATED"],
|
||||
browser_family=["CHROME"],
|
||||
continent=["string"],
|
||||
date_end=[parse_datetime("2019-12-27T18:11:19.117Z")],
|
||||
date_range=["7d"],
|
||||
date_start=[parse_datetime("2019-12-27T18:11:19.117Z")],
|
||||
device_type=["DESKTOP"],
|
||||
format="JSON",
|
||||
http_protocol=["HTTP", "HTTPS"],
|
||||
http_version=["HTTPv1", "HTTPv2", "HTTPv3"],
|
||||
ip_version=["IPv4", "IPv6"],
|
||||
http_protocol=["HTTP"],
|
||||
http_version=["HTTPv1"],
|
||||
ip_version=["IPv4"],
|
||||
limit=5,
|
||||
location=["string", "string", "string"],
|
||||
name=["string", "string", "string"],
|
||||
os=["WINDOWS", "MACOSX", "IOS"],
|
||||
location=["string"],
|
||||
name=["string"],
|
||||
os=["WINDOWS"],
|
||||
)
|
||||
assert_matches_type(TLSVersionGetResponse, tls_version, path=["response"])
|
||||
|
||||
|
|
@ -95,30 +87,22 @@ class TestAsyncTLSVersion:
|
|||
async def test_method_get_with_all_params(self, async_client: AsyncCloudflare) -> None:
|
||||
tls_version = await async_client.radar.http.ases.tls_version.get(
|
||||
tls_version="TLSv1_0",
|
||||
asn=["string", "string", "string"],
|
||||
bot_class=["LIKELY_AUTOMATED", "LIKELY_HUMAN"],
|
||||
browser_family=["CHROME", "EDGE", "FIREFOX"],
|
||||
continent=["string", "string", "string"],
|
||||
date_end=[
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
],
|
||||
date_range=["7d", "7d", "7d"],
|
||||
date_start=[
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
],
|
||||
device_type=["DESKTOP", "MOBILE", "OTHER"],
|
||||
asn=["string"],
|
||||
bot_class=["LIKELY_AUTOMATED"],
|
||||
browser_family=["CHROME"],
|
||||
continent=["string"],
|
||||
date_end=[parse_datetime("2019-12-27T18:11:19.117Z")],
|
||||
date_range=["7d"],
|
||||
date_start=[parse_datetime("2019-12-27T18:11:19.117Z")],
|
||||
device_type=["DESKTOP"],
|
||||
format="JSON",
|
||||
http_protocol=["HTTP", "HTTPS"],
|
||||
http_version=["HTTPv1", "HTTPv2", "HTTPv3"],
|
||||
ip_version=["IPv4", "IPv6"],
|
||||
http_protocol=["HTTP"],
|
||||
http_version=["HTTPv1"],
|
||||
ip_version=["IPv4"],
|
||||
limit=5,
|
||||
location=["string", "string", "string"],
|
||||
name=["string", "string", "string"],
|
||||
os=["WINDOWS", "MACOSX", "IOS"],
|
||||
location=["string"],
|
||||
name=["string"],
|
||||
os=["WINDOWS"],
|
||||
)
|
||||
assert_matches_type(TLSVersionGetResponse, tls_version, path=["response"])
|
||||
|
||||
|
|
|
|||
|
|
@ -29,30 +29,22 @@ class TestBotClass:
|
|||
def test_method_get_with_all_params(self, client: Cloudflare) -> None:
|
||||
bot_class = client.radar.http.locations.bot_class.get(
|
||||
bot_class="LIKELY_AUTOMATED",
|
||||
asn=["string", "string", "string"],
|
||||
browser_family=["CHROME", "EDGE", "FIREFOX"],
|
||||
continent=["string", "string", "string"],
|
||||
date_end=[
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
],
|
||||
date_range=["7d", "7d", "7d"],
|
||||
date_start=[
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
],
|
||||
device_type=["DESKTOP", "MOBILE", "OTHER"],
|
||||
asn=["string"],
|
||||
browser_family=["CHROME"],
|
||||
continent=["string"],
|
||||
date_end=[parse_datetime("2019-12-27T18:11:19.117Z")],
|
||||
date_range=["7d"],
|
||||
date_start=[parse_datetime("2019-12-27T18:11:19.117Z")],
|
||||
device_type=["DESKTOP"],
|
||||
format="JSON",
|
||||
http_protocol=["HTTP", "HTTPS"],
|
||||
http_version=["HTTPv1", "HTTPv2", "HTTPv3"],
|
||||
ip_version=["IPv4", "IPv6"],
|
||||
http_protocol=["HTTP"],
|
||||
http_version=["HTTPv1"],
|
||||
ip_version=["IPv4"],
|
||||
limit=5,
|
||||
location=["string", "string", "string"],
|
||||
name=["string", "string", "string"],
|
||||
os=["WINDOWS", "MACOSX", "IOS"],
|
||||
tls_version=["TLSv1_0", "TLSv1_1", "TLSv1_2"],
|
||||
location=["string"],
|
||||
name=["string"],
|
||||
os=["WINDOWS"],
|
||||
tls_version=["TLSv1_0"],
|
||||
)
|
||||
assert_matches_type(BotClassGetResponse, bot_class, path=["response"])
|
||||
|
||||
|
|
@ -95,30 +87,22 @@ class TestAsyncBotClass:
|
|||
async def test_method_get_with_all_params(self, async_client: AsyncCloudflare) -> None:
|
||||
bot_class = await async_client.radar.http.locations.bot_class.get(
|
||||
bot_class="LIKELY_AUTOMATED",
|
||||
asn=["string", "string", "string"],
|
||||
browser_family=["CHROME", "EDGE", "FIREFOX"],
|
||||
continent=["string", "string", "string"],
|
||||
date_end=[
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
],
|
||||
date_range=["7d", "7d", "7d"],
|
||||
date_start=[
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
],
|
||||
device_type=["DESKTOP", "MOBILE", "OTHER"],
|
||||
asn=["string"],
|
||||
browser_family=["CHROME"],
|
||||
continent=["string"],
|
||||
date_end=[parse_datetime("2019-12-27T18:11:19.117Z")],
|
||||
date_range=["7d"],
|
||||
date_start=[parse_datetime("2019-12-27T18:11:19.117Z")],
|
||||
device_type=["DESKTOP"],
|
||||
format="JSON",
|
||||
http_protocol=["HTTP", "HTTPS"],
|
||||
http_version=["HTTPv1", "HTTPv2", "HTTPv3"],
|
||||
ip_version=["IPv4", "IPv6"],
|
||||
http_protocol=["HTTP"],
|
||||
http_version=["HTTPv1"],
|
||||
ip_version=["IPv4"],
|
||||
limit=5,
|
||||
location=["string", "string", "string"],
|
||||
name=["string", "string", "string"],
|
||||
os=["WINDOWS", "MACOSX", "IOS"],
|
||||
tls_version=["TLSv1_0", "TLSv1_1", "TLSv1_2"],
|
||||
location=["string"],
|
||||
name=["string"],
|
||||
os=["WINDOWS"],
|
||||
tls_version=["TLSv1_0"],
|
||||
)
|
||||
assert_matches_type(BotClassGetResponse, bot_class, path=["response"])
|
||||
|
||||
|
|
|
|||
|
|
@ -29,30 +29,22 @@ class TestBrowserFamily:
|
|||
def test_method_get_with_all_params(self, client: Cloudflare) -> None:
|
||||
browser_family = client.radar.http.locations.browser_family.get(
|
||||
browser_family="CHROME",
|
||||
asn=["string", "string", "string"],
|
||||
bot_class=["LIKELY_AUTOMATED", "LIKELY_HUMAN"],
|
||||
continent=["string", "string", "string"],
|
||||
date_end=[
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
],
|
||||
date_range=["7d", "7d", "7d"],
|
||||
date_start=[
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
],
|
||||
device_type=["DESKTOP", "MOBILE", "OTHER"],
|
||||
asn=["string"],
|
||||
bot_class=["LIKELY_AUTOMATED"],
|
||||
continent=["string"],
|
||||
date_end=[parse_datetime("2019-12-27T18:11:19.117Z")],
|
||||
date_range=["7d"],
|
||||
date_start=[parse_datetime("2019-12-27T18:11:19.117Z")],
|
||||
device_type=["DESKTOP"],
|
||||
format="JSON",
|
||||
http_protocol=["HTTP", "HTTPS"],
|
||||
http_version=["HTTPv1", "HTTPv2", "HTTPv3"],
|
||||
ip_version=["IPv4", "IPv6"],
|
||||
http_protocol=["HTTP"],
|
||||
http_version=["HTTPv1"],
|
||||
ip_version=["IPv4"],
|
||||
limit=5,
|
||||
location=["string", "string", "string"],
|
||||
name=["string", "string", "string"],
|
||||
os=["WINDOWS", "MACOSX", "IOS"],
|
||||
tls_version=["TLSv1_0", "TLSv1_1", "TLSv1_2"],
|
||||
location=["string"],
|
||||
name=["string"],
|
||||
os=["WINDOWS"],
|
||||
tls_version=["TLSv1_0"],
|
||||
)
|
||||
assert_matches_type(BrowserFamilyGetResponse, browser_family, path=["response"])
|
||||
|
||||
|
|
@ -95,30 +87,22 @@ class TestAsyncBrowserFamily:
|
|||
async def test_method_get_with_all_params(self, async_client: AsyncCloudflare) -> None:
|
||||
browser_family = await async_client.radar.http.locations.browser_family.get(
|
||||
browser_family="CHROME",
|
||||
asn=["string", "string", "string"],
|
||||
bot_class=["LIKELY_AUTOMATED", "LIKELY_HUMAN"],
|
||||
continent=["string", "string", "string"],
|
||||
date_end=[
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
],
|
||||
date_range=["7d", "7d", "7d"],
|
||||
date_start=[
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
],
|
||||
device_type=["DESKTOP", "MOBILE", "OTHER"],
|
||||
asn=["string"],
|
||||
bot_class=["LIKELY_AUTOMATED"],
|
||||
continent=["string"],
|
||||
date_end=[parse_datetime("2019-12-27T18:11:19.117Z")],
|
||||
date_range=["7d"],
|
||||
date_start=[parse_datetime("2019-12-27T18:11:19.117Z")],
|
||||
device_type=["DESKTOP"],
|
||||
format="JSON",
|
||||
http_protocol=["HTTP", "HTTPS"],
|
||||
http_version=["HTTPv1", "HTTPv2", "HTTPv3"],
|
||||
ip_version=["IPv4", "IPv6"],
|
||||
http_protocol=["HTTP"],
|
||||
http_version=["HTTPv1"],
|
||||
ip_version=["IPv4"],
|
||||
limit=5,
|
||||
location=["string", "string", "string"],
|
||||
name=["string", "string", "string"],
|
||||
os=["WINDOWS", "MACOSX", "IOS"],
|
||||
tls_version=["TLSv1_0", "TLSv1_1", "TLSv1_2"],
|
||||
location=["string"],
|
||||
name=["string"],
|
||||
os=["WINDOWS"],
|
||||
tls_version=["TLSv1_0"],
|
||||
)
|
||||
assert_matches_type(BrowserFamilyGetResponse, browser_family, path=["response"])
|
||||
|
||||
|
|
|
|||
|
|
@ -29,30 +29,22 @@ class TestDeviceType:
|
|||
def test_method_get_with_all_params(self, client: Cloudflare) -> None:
|
||||
device_type = client.radar.http.locations.device_type.get(
|
||||
device_type="DESKTOP",
|
||||
asn=["string", "string", "string"],
|
||||
bot_class=["LIKELY_AUTOMATED", "LIKELY_HUMAN"],
|
||||
browser_family=["CHROME", "EDGE", "FIREFOX"],
|
||||
continent=["string", "string", "string"],
|
||||
date_end=[
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
],
|
||||
date_range=["7d", "7d", "7d"],
|
||||
date_start=[
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
],
|
||||
asn=["string"],
|
||||
bot_class=["LIKELY_AUTOMATED"],
|
||||
browser_family=["CHROME"],
|
||||
continent=["string"],
|
||||
date_end=[parse_datetime("2019-12-27T18:11:19.117Z")],
|
||||
date_range=["7d"],
|
||||
date_start=[parse_datetime("2019-12-27T18:11:19.117Z")],
|
||||
format="JSON",
|
||||
http_protocol=["HTTP", "HTTPS"],
|
||||
http_version=["HTTPv1", "HTTPv2", "HTTPv3"],
|
||||
ip_version=["IPv4", "IPv6"],
|
||||
http_protocol=["HTTP"],
|
||||
http_version=["HTTPv1"],
|
||||
ip_version=["IPv4"],
|
||||
limit=5,
|
||||
location=["string", "string", "string"],
|
||||
name=["string", "string", "string"],
|
||||
os=["WINDOWS", "MACOSX", "IOS"],
|
||||
tls_version=["TLSv1_0", "TLSv1_1", "TLSv1_2"],
|
||||
location=["string"],
|
||||
name=["string"],
|
||||
os=["WINDOWS"],
|
||||
tls_version=["TLSv1_0"],
|
||||
)
|
||||
assert_matches_type(DeviceTypeGetResponse, device_type, path=["response"])
|
||||
|
||||
|
|
@ -95,30 +87,22 @@ class TestAsyncDeviceType:
|
|||
async def test_method_get_with_all_params(self, async_client: AsyncCloudflare) -> None:
|
||||
device_type = await async_client.radar.http.locations.device_type.get(
|
||||
device_type="DESKTOP",
|
||||
asn=["string", "string", "string"],
|
||||
bot_class=["LIKELY_AUTOMATED", "LIKELY_HUMAN"],
|
||||
browser_family=["CHROME", "EDGE", "FIREFOX"],
|
||||
continent=["string", "string", "string"],
|
||||
date_end=[
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
],
|
||||
date_range=["7d", "7d", "7d"],
|
||||
date_start=[
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
],
|
||||
asn=["string"],
|
||||
bot_class=["LIKELY_AUTOMATED"],
|
||||
browser_family=["CHROME"],
|
||||
continent=["string"],
|
||||
date_end=[parse_datetime("2019-12-27T18:11:19.117Z")],
|
||||
date_range=["7d"],
|
||||
date_start=[parse_datetime("2019-12-27T18:11:19.117Z")],
|
||||
format="JSON",
|
||||
http_protocol=["HTTP", "HTTPS"],
|
||||
http_version=["HTTPv1", "HTTPv2", "HTTPv3"],
|
||||
ip_version=["IPv4", "IPv6"],
|
||||
http_protocol=["HTTP"],
|
||||
http_version=["HTTPv1"],
|
||||
ip_version=["IPv4"],
|
||||
limit=5,
|
||||
location=["string", "string", "string"],
|
||||
name=["string", "string", "string"],
|
||||
os=["WINDOWS", "MACOSX", "IOS"],
|
||||
tls_version=["TLSv1_0", "TLSv1_1", "TLSv1_2"],
|
||||
location=["string"],
|
||||
name=["string"],
|
||||
os=["WINDOWS"],
|
||||
tls_version=["TLSv1_0"],
|
||||
)
|
||||
assert_matches_type(DeviceTypeGetResponse, device_type, path=["response"])
|
||||
|
||||
|
|
|
|||
|
|
@ -29,30 +29,22 @@ class TestHTTPMethod:
|
|||
def test_method_get_with_all_params(self, client: Cloudflare) -> None:
|
||||
http_method = client.radar.http.locations.http_method.get(
|
||||
http_version="HTTPv1",
|
||||
asn=["string", "string", "string"],
|
||||
bot_class=["LIKELY_AUTOMATED", "LIKELY_HUMAN"],
|
||||
browser_family=["CHROME", "EDGE", "FIREFOX"],
|
||||
continent=["string", "string", "string"],
|
||||
date_end=[
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
],
|
||||
date_range=["7d", "7d", "7d"],
|
||||
date_start=[
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
],
|
||||
device_type=["DESKTOP", "MOBILE", "OTHER"],
|
||||
asn=["string"],
|
||||
bot_class=["LIKELY_AUTOMATED"],
|
||||
browser_family=["CHROME"],
|
||||
continent=["string"],
|
||||
date_end=[parse_datetime("2019-12-27T18:11:19.117Z")],
|
||||
date_range=["7d"],
|
||||
date_start=[parse_datetime("2019-12-27T18:11:19.117Z")],
|
||||
device_type=["DESKTOP"],
|
||||
format="JSON",
|
||||
http_protocol=["HTTP", "HTTPS"],
|
||||
ip_version=["IPv4", "IPv6"],
|
||||
http_protocol=["HTTP"],
|
||||
ip_version=["IPv4"],
|
||||
limit=5,
|
||||
location=["string", "string", "string"],
|
||||
name=["string", "string", "string"],
|
||||
os=["WINDOWS", "MACOSX", "IOS"],
|
||||
tls_version=["TLSv1_0", "TLSv1_1", "TLSv1_2"],
|
||||
location=["string"],
|
||||
name=["string"],
|
||||
os=["WINDOWS"],
|
||||
tls_version=["TLSv1_0"],
|
||||
)
|
||||
assert_matches_type(HTTPMethodGetResponse, http_method, path=["response"])
|
||||
|
||||
|
|
@ -95,30 +87,22 @@ class TestAsyncHTTPMethod:
|
|||
async def test_method_get_with_all_params(self, async_client: AsyncCloudflare) -> None:
|
||||
http_method = await async_client.radar.http.locations.http_method.get(
|
||||
http_version="HTTPv1",
|
||||
asn=["string", "string", "string"],
|
||||
bot_class=["LIKELY_AUTOMATED", "LIKELY_HUMAN"],
|
||||
browser_family=["CHROME", "EDGE", "FIREFOX"],
|
||||
continent=["string", "string", "string"],
|
||||
date_end=[
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
],
|
||||
date_range=["7d", "7d", "7d"],
|
||||
date_start=[
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
],
|
||||
device_type=["DESKTOP", "MOBILE", "OTHER"],
|
||||
asn=["string"],
|
||||
bot_class=["LIKELY_AUTOMATED"],
|
||||
browser_family=["CHROME"],
|
||||
continent=["string"],
|
||||
date_end=[parse_datetime("2019-12-27T18:11:19.117Z")],
|
||||
date_range=["7d"],
|
||||
date_start=[parse_datetime("2019-12-27T18:11:19.117Z")],
|
||||
device_type=["DESKTOP"],
|
||||
format="JSON",
|
||||
http_protocol=["HTTP", "HTTPS"],
|
||||
ip_version=["IPv4", "IPv6"],
|
||||
http_protocol=["HTTP"],
|
||||
ip_version=["IPv4"],
|
||||
limit=5,
|
||||
location=["string", "string", "string"],
|
||||
name=["string", "string", "string"],
|
||||
os=["WINDOWS", "MACOSX", "IOS"],
|
||||
tls_version=["TLSv1_0", "TLSv1_1", "TLSv1_2"],
|
||||
location=["string"],
|
||||
name=["string"],
|
||||
os=["WINDOWS"],
|
||||
tls_version=["TLSv1_0"],
|
||||
)
|
||||
assert_matches_type(HTTPMethodGetResponse, http_method, path=["response"])
|
||||
|
||||
|
|
|
|||
|
|
@ -29,29 +29,21 @@ class TestHTTPProtocol:
|
|||
def test_method_get_with_all_params(self, client: Cloudflare) -> None:
|
||||
http_protocol = client.radar.http.locations.http_protocol.get(
|
||||
http_protocol="HTTP",
|
||||
asn=["string", "string", "string"],
|
||||
bot_class=["LIKELY_AUTOMATED", "LIKELY_HUMAN"],
|
||||
browser_family=["CHROME", "EDGE", "FIREFOX"],
|
||||
continent=["string", "string", "string"],
|
||||
date_end=[
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
],
|
||||
date_range=["7d", "7d", "7d"],
|
||||
date_start=[
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
],
|
||||
device_type=["DESKTOP", "MOBILE", "OTHER"],
|
||||
asn=["string"],
|
||||
bot_class=["LIKELY_AUTOMATED"],
|
||||
browser_family=["CHROME"],
|
||||
continent=["string"],
|
||||
date_end=[parse_datetime("2019-12-27T18:11:19.117Z")],
|
||||
date_range=["7d"],
|
||||
date_start=[parse_datetime("2019-12-27T18:11:19.117Z")],
|
||||
device_type=["DESKTOP"],
|
||||
format="JSON",
|
||||
ip_version=["IPv4", "IPv6"],
|
||||
ip_version=["IPv4"],
|
||||
limit=5,
|
||||
location=["string", "string", "string"],
|
||||
name=["string", "string", "string"],
|
||||
os=["WINDOWS", "MACOSX", "IOS"],
|
||||
tls_version=["TLSv1_0", "TLSv1_1", "TLSv1_2"],
|
||||
location=["string"],
|
||||
name=["string"],
|
||||
os=["WINDOWS"],
|
||||
tls_version=["TLSv1_0"],
|
||||
)
|
||||
assert_matches_type(HTTPProtocolGetResponse, http_protocol, path=["response"])
|
||||
|
||||
|
|
@ -94,29 +86,21 @@ class TestAsyncHTTPProtocol:
|
|||
async def test_method_get_with_all_params(self, async_client: AsyncCloudflare) -> None:
|
||||
http_protocol = await async_client.radar.http.locations.http_protocol.get(
|
||||
http_protocol="HTTP",
|
||||
asn=["string", "string", "string"],
|
||||
bot_class=["LIKELY_AUTOMATED", "LIKELY_HUMAN"],
|
||||
browser_family=["CHROME", "EDGE", "FIREFOX"],
|
||||
continent=["string", "string", "string"],
|
||||
date_end=[
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
],
|
||||
date_range=["7d", "7d", "7d"],
|
||||
date_start=[
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
],
|
||||
device_type=["DESKTOP", "MOBILE", "OTHER"],
|
||||
asn=["string"],
|
||||
bot_class=["LIKELY_AUTOMATED"],
|
||||
browser_family=["CHROME"],
|
||||
continent=["string"],
|
||||
date_end=[parse_datetime("2019-12-27T18:11:19.117Z")],
|
||||
date_range=["7d"],
|
||||
date_start=[parse_datetime("2019-12-27T18:11:19.117Z")],
|
||||
device_type=["DESKTOP"],
|
||||
format="JSON",
|
||||
ip_version=["IPv4", "IPv6"],
|
||||
ip_version=["IPv4"],
|
||||
limit=5,
|
||||
location=["string", "string", "string"],
|
||||
name=["string", "string", "string"],
|
||||
os=["WINDOWS", "MACOSX", "IOS"],
|
||||
tls_version=["TLSv1_0", "TLSv1_1", "TLSv1_2"],
|
||||
location=["string"],
|
||||
name=["string"],
|
||||
os=["WINDOWS"],
|
||||
tls_version=["TLSv1_0"],
|
||||
)
|
||||
assert_matches_type(HTTPProtocolGetResponse, http_protocol, path=["response"])
|
||||
|
||||
|
|
|
|||
|
|
@ -29,30 +29,22 @@ class TestIPVersion:
|
|||
def test_method_get_with_all_params(self, client: Cloudflare) -> None:
|
||||
ip_version = client.radar.http.locations.ip_version.get(
|
||||
ip_version="IPv4",
|
||||
asn=["string", "string", "string"],
|
||||
bot_class=["LIKELY_AUTOMATED", "LIKELY_HUMAN"],
|
||||
browser_family=["CHROME", "EDGE", "FIREFOX"],
|
||||
continent=["string", "string", "string"],
|
||||
date_end=[
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
],
|
||||
date_range=["7d", "7d", "7d"],
|
||||
date_start=[
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
],
|
||||
device_type=["DESKTOP", "MOBILE", "OTHER"],
|
||||
asn=["string"],
|
||||
bot_class=["LIKELY_AUTOMATED"],
|
||||
browser_family=["CHROME"],
|
||||
continent=["string"],
|
||||
date_end=[parse_datetime("2019-12-27T18:11:19.117Z")],
|
||||
date_range=["7d"],
|
||||
date_start=[parse_datetime("2019-12-27T18:11:19.117Z")],
|
||||
device_type=["DESKTOP"],
|
||||
format="JSON",
|
||||
http_protocol=["HTTP", "HTTPS"],
|
||||
http_version=["HTTPv1", "HTTPv2", "HTTPv3"],
|
||||
http_protocol=["HTTP"],
|
||||
http_version=["HTTPv1"],
|
||||
limit=5,
|
||||
location=["string", "string", "string"],
|
||||
name=["string", "string", "string"],
|
||||
os=["WINDOWS", "MACOSX", "IOS"],
|
||||
tls_version=["TLSv1_0", "TLSv1_1", "TLSv1_2"],
|
||||
location=["string"],
|
||||
name=["string"],
|
||||
os=["WINDOWS"],
|
||||
tls_version=["TLSv1_0"],
|
||||
)
|
||||
assert_matches_type(IPVersionGetResponse, ip_version, path=["response"])
|
||||
|
||||
|
|
@ -95,30 +87,22 @@ class TestAsyncIPVersion:
|
|||
async def test_method_get_with_all_params(self, async_client: AsyncCloudflare) -> None:
|
||||
ip_version = await async_client.radar.http.locations.ip_version.get(
|
||||
ip_version="IPv4",
|
||||
asn=["string", "string", "string"],
|
||||
bot_class=["LIKELY_AUTOMATED", "LIKELY_HUMAN"],
|
||||
browser_family=["CHROME", "EDGE", "FIREFOX"],
|
||||
continent=["string", "string", "string"],
|
||||
date_end=[
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
],
|
||||
date_range=["7d", "7d", "7d"],
|
||||
date_start=[
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
],
|
||||
device_type=["DESKTOP", "MOBILE", "OTHER"],
|
||||
asn=["string"],
|
||||
bot_class=["LIKELY_AUTOMATED"],
|
||||
browser_family=["CHROME"],
|
||||
continent=["string"],
|
||||
date_end=[parse_datetime("2019-12-27T18:11:19.117Z")],
|
||||
date_range=["7d"],
|
||||
date_start=[parse_datetime("2019-12-27T18:11:19.117Z")],
|
||||
device_type=["DESKTOP"],
|
||||
format="JSON",
|
||||
http_protocol=["HTTP", "HTTPS"],
|
||||
http_version=["HTTPv1", "HTTPv2", "HTTPv3"],
|
||||
http_protocol=["HTTP"],
|
||||
http_version=["HTTPv1"],
|
||||
limit=5,
|
||||
location=["string", "string", "string"],
|
||||
name=["string", "string", "string"],
|
||||
os=["WINDOWS", "MACOSX", "IOS"],
|
||||
tls_version=["TLSv1_0", "TLSv1_1", "TLSv1_2"],
|
||||
location=["string"],
|
||||
name=["string"],
|
||||
os=["WINDOWS"],
|
||||
tls_version=["TLSv1_0"],
|
||||
)
|
||||
assert_matches_type(IPVersionGetResponse, ip_version, path=["response"])
|
||||
|
||||
|
|
|
|||
|
|
@ -29,30 +29,22 @@ class TestOS:
|
|||
def test_method_get_with_all_params(self, client: Cloudflare) -> None:
|
||||
os = client.radar.http.locations.os.get(
|
||||
os="WINDOWS",
|
||||
asn=["string", "string", "string"],
|
||||
bot_class=["LIKELY_AUTOMATED", "LIKELY_HUMAN"],
|
||||
browser_family=["CHROME", "EDGE", "FIREFOX"],
|
||||
continent=["string", "string", "string"],
|
||||
date_end=[
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
],
|
||||
date_range=["7d", "7d", "7d"],
|
||||
date_start=[
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
],
|
||||
device_type=["DESKTOP", "MOBILE", "OTHER"],
|
||||
asn=["string"],
|
||||
bot_class=["LIKELY_AUTOMATED"],
|
||||
browser_family=["CHROME"],
|
||||
continent=["string"],
|
||||
date_end=[parse_datetime("2019-12-27T18:11:19.117Z")],
|
||||
date_range=["7d"],
|
||||
date_start=[parse_datetime("2019-12-27T18:11:19.117Z")],
|
||||
device_type=["DESKTOP"],
|
||||
format="JSON",
|
||||
http_protocol=["HTTP", "HTTPS"],
|
||||
http_version=["HTTPv1", "HTTPv2", "HTTPv3"],
|
||||
ip_version=["IPv4", "IPv6"],
|
||||
http_protocol=["HTTP"],
|
||||
http_version=["HTTPv1"],
|
||||
ip_version=["IPv4"],
|
||||
limit=5,
|
||||
location=["string", "string", "string"],
|
||||
name=["string", "string", "string"],
|
||||
tls_version=["TLSv1_0", "TLSv1_1", "TLSv1_2"],
|
||||
location=["string"],
|
||||
name=["string"],
|
||||
tls_version=["TLSv1_0"],
|
||||
)
|
||||
assert_matches_type(OSGetResponse, os, path=["response"])
|
||||
|
||||
|
|
@ -95,30 +87,22 @@ class TestAsyncOS:
|
|||
async def test_method_get_with_all_params(self, async_client: AsyncCloudflare) -> None:
|
||||
os = await async_client.radar.http.locations.os.get(
|
||||
os="WINDOWS",
|
||||
asn=["string", "string", "string"],
|
||||
bot_class=["LIKELY_AUTOMATED", "LIKELY_HUMAN"],
|
||||
browser_family=["CHROME", "EDGE", "FIREFOX"],
|
||||
continent=["string", "string", "string"],
|
||||
date_end=[
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
],
|
||||
date_range=["7d", "7d", "7d"],
|
||||
date_start=[
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
],
|
||||
device_type=["DESKTOP", "MOBILE", "OTHER"],
|
||||
asn=["string"],
|
||||
bot_class=["LIKELY_AUTOMATED"],
|
||||
browser_family=["CHROME"],
|
||||
continent=["string"],
|
||||
date_end=[parse_datetime("2019-12-27T18:11:19.117Z")],
|
||||
date_range=["7d"],
|
||||
date_start=[parse_datetime("2019-12-27T18:11:19.117Z")],
|
||||
device_type=["DESKTOP"],
|
||||
format="JSON",
|
||||
http_protocol=["HTTP", "HTTPS"],
|
||||
http_version=["HTTPv1", "HTTPv2", "HTTPv3"],
|
||||
ip_version=["IPv4", "IPv6"],
|
||||
http_protocol=["HTTP"],
|
||||
http_version=["HTTPv1"],
|
||||
ip_version=["IPv4"],
|
||||
limit=5,
|
||||
location=["string", "string", "string"],
|
||||
name=["string", "string", "string"],
|
||||
tls_version=["TLSv1_0", "TLSv1_1", "TLSv1_2"],
|
||||
location=["string"],
|
||||
name=["string"],
|
||||
tls_version=["TLSv1_0"],
|
||||
)
|
||||
assert_matches_type(OSGetResponse, os, path=["response"])
|
||||
|
||||
|
|
|
|||
|
|
@ -29,30 +29,22 @@ class TestTLSVersion:
|
|||
def test_method_get_with_all_params(self, client: Cloudflare) -> None:
|
||||
tls_version = client.radar.http.locations.tls_version.get(
|
||||
tls_version="TLSv1_0",
|
||||
asn=["string", "string", "string"],
|
||||
bot_class=["LIKELY_AUTOMATED", "LIKELY_HUMAN"],
|
||||
browser_family=["CHROME", "EDGE", "FIREFOX"],
|
||||
continent=["string", "string", "string"],
|
||||
date_end=[
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
],
|
||||
date_range=["7d", "7d", "7d"],
|
||||
date_start=[
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
],
|
||||
device_type=["DESKTOP", "MOBILE", "OTHER"],
|
||||
asn=["string"],
|
||||
bot_class=["LIKELY_AUTOMATED"],
|
||||
browser_family=["CHROME"],
|
||||
continent=["string"],
|
||||
date_end=[parse_datetime("2019-12-27T18:11:19.117Z")],
|
||||
date_range=["7d"],
|
||||
date_start=[parse_datetime("2019-12-27T18:11:19.117Z")],
|
||||
device_type=["DESKTOP"],
|
||||
format="JSON",
|
||||
http_protocol=["HTTP", "HTTPS"],
|
||||
http_version=["HTTPv1", "HTTPv2", "HTTPv3"],
|
||||
ip_version=["IPv4", "IPv6"],
|
||||
http_protocol=["HTTP"],
|
||||
http_version=["HTTPv1"],
|
||||
ip_version=["IPv4"],
|
||||
limit=5,
|
||||
location=["string", "string", "string"],
|
||||
name=["string", "string", "string"],
|
||||
os=["WINDOWS", "MACOSX", "IOS"],
|
||||
location=["string"],
|
||||
name=["string"],
|
||||
os=["WINDOWS"],
|
||||
)
|
||||
assert_matches_type(TLSVersionGetResponse, tls_version, path=["response"])
|
||||
|
||||
|
|
@ -95,30 +87,22 @@ class TestAsyncTLSVersion:
|
|||
async def test_method_get_with_all_params(self, async_client: AsyncCloudflare) -> None:
|
||||
tls_version = await async_client.radar.http.locations.tls_version.get(
|
||||
tls_version="TLSv1_0",
|
||||
asn=["string", "string", "string"],
|
||||
bot_class=["LIKELY_AUTOMATED", "LIKELY_HUMAN"],
|
||||
browser_family=["CHROME", "EDGE", "FIREFOX"],
|
||||
continent=["string", "string", "string"],
|
||||
date_end=[
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
],
|
||||
date_range=["7d", "7d", "7d"],
|
||||
date_start=[
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
],
|
||||
device_type=["DESKTOP", "MOBILE", "OTHER"],
|
||||
asn=["string"],
|
||||
bot_class=["LIKELY_AUTOMATED"],
|
||||
browser_family=["CHROME"],
|
||||
continent=["string"],
|
||||
date_end=[parse_datetime("2019-12-27T18:11:19.117Z")],
|
||||
date_range=["7d"],
|
||||
date_start=[parse_datetime("2019-12-27T18:11:19.117Z")],
|
||||
device_type=["DESKTOP"],
|
||||
format="JSON",
|
||||
http_protocol=["HTTP", "HTTPS"],
|
||||
http_version=["HTTPv1", "HTTPv2", "HTTPv3"],
|
||||
ip_version=["IPv4", "IPv6"],
|
||||
http_protocol=["HTTP"],
|
||||
http_version=["HTTPv1"],
|
||||
ip_version=["IPv4"],
|
||||
limit=5,
|
||||
location=["string", "string", "string"],
|
||||
name=["string", "string", "string"],
|
||||
os=["WINDOWS", "MACOSX", "IOS"],
|
||||
location=["string"],
|
||||
name=["string"],
|
||||
os=["WINDOWS"],
|
||||
)
|
||||
assert_matches_type(TLSVersionGetResponse, tls_version, path=["response"])
|
||||
|
||||
|
|
|
|||
|
|
@ -26,31 +26,23 @@ class TestAses:
|
|||
@parametrize
|
||||
def test_method_get_with_all_params(self, client: Cloudflare) -> None:
|
||||
ase = client.radar.http.ases.get(
|
||||
asn=["string", "string", "string"],
|
||||
bot_class=["LIKELY_AUTOMATED", "LIKELY_HUMAN"],
|
||||
browser_family=["CHROME", "EDGE", "FIREFOX"],
|
||||
continent=["string", "string", "string"],
|
||||
date_end=[
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
],
|
||||
date_range=["7d", "7d", "7d"],
|
||||
date_start=[
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
],
|
||||
device_type=["DESKTOP", "MOBILE", "OTHER"],
|
||||
asn=["string"],
|
||||
bot_class=["LIKELY_AUTOMATED"],
|
||||
browser_family=["CHROME"],
|
||||
continent=["string"],
|
||||
date_end=[parse_datetime("2019-12-27T18:11:19.117Z")],
|
||||
date_range=["7d"],
|
||||
date_start=[parse_datetime("2019-12-27T18:11:19.117Z")],
|
||||
device_type=["DESKTOP"],
|
||||
format="JSON",
|
||||
http_protocol=["HTTP", "HTTPS"],
|
||||
http_version=["HTTPv1", "HTTPv2", "HTTPv3"],
|
||||
ip_version=["IPv4", "IPv6"],
|
||||
http_protocol=["HTTP"],
|
||||
http_version=["HTTPv1"],
|
||||
ip_version=["IPv4"],
|
||||
limit=5,
|
||||
location=["string", "string", "string"],
|
||||
name=["string", "string", "string"],
|
||||
os=["WINDOWS", "MACOSX", "IOS"],
|
||||
tls_version=["TLSv1_0", "TLSv1_1", "TLSv1_2"],
|
||||
location=["string"],
|
||||
name=["string"],
|
||||
os=["WINDOWS"],
|
||||
tls_version=["TLSv1_0"],
|
||||
)
|
||||
assert_matches_type(AseGetResponse, ase, path=["response"])
|
||||
|
||||
|
|
@ -86,31 +78,23 @@ class TestAsyncAses:
|
|||
@parametrize
|
||||
async def test_method_get_with_all_params(self, async_client: AsyncCloudflare) -> None:
|
||||
ase = await async_client.radar.http.ases.get(
|
||||
asn=["string", "string", "string"],
|
||||
bot_class=["LIKELY_AUTOMATED", "LIKELY_HUMAN"],
|
||||
browser_family=["CHROME", "EDGE", "FIREFOX"],
|
||||
continent=["string", "string", "string"],
|
||||
date_end=[
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
],
|
||||
date_range=["7d", "7d", "7d"],
|
||||
date_start=[
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
],
|
||||
device_type=["DESKTOP", "MOBILE", "OTHER"],
|
||||
asn=["string"],
|
||||
bot_class=["LIKELY_AUTOMATED"],
|
||||
browser_family=["CHROME"],
|
||||
continent=["string"],
|
||||
date_end=[parse_datetime("2019-12-27T18:11:19.117Z")],
|
||||
date_range=["7d"],
|
||||
date_start=[parse_datetime("2019-12-27T18:11:19.117Z")],
|
||||
device_type=["DESKTOP"],
|
||||
format="JSON",
|
||||
http_protocol=["HTTP", "HTTPS"],
|
||||
http_version=["HTTPv1", "HTTPv2", "HTTPv3"],
|
||||
ip_version=["IPv4", "IPv6"],
|
||||
http_protocol=["HTTP"],
|
||||
http_version=["HTTPv1"],
|
||||
ip_version=["IPv4"],
|
||||
limit=5,
|
||||
location=["string", "string", "string"],
|
||||
name=["string", "string", "string"],
|
||||
os=["WINDOWS", "MACOSX", "IOS"],
|
||||
tls_version=["TLSv1_0", "TLSv1_1", "TLSv1_2"],
|
||||
location=["string"],
|
||||
name=["string"],
|
||||
os=["WINDOWS"],
|
||||
tls_version=["TLSv1_0"],
|
||||
)
|
||||
assert_matches_type(AseGetResponse, ase, path=["response"])
|
||||
|
||||
|
|
|
|||
|
|
@ -26,31 +26,23 @@ class TestLocations:
|
|||
@parametrize
|
||||
def test_method_get_with_all_params(self, client: Cloudflare) -> None:
|
||||
location = client.radar.http.locations.get(
|
||||
asn=["string", "string", "string"],
|
||||
bot_class=["LIKELY_AUTOMATED", "LIKELY_HUMAN"],
|
||||
browser_family=["CHROME", "EDGE", "FIREFOX"],
|
||||
continent=["string", "string", "string"],
|
||||
date_end=[
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
],
|
||||
date_range=["7d", "7d", "7d"],
|
||||
date_start=[
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
],
|
||||
device_type=["DESKTOP", "MOBILE", "OTHER"],
|
||||
asn=["string"],
|
||||
bot_class=["LIKELY_AUTOMATED"],
|
||||
browser_family=["CHROME"],
|
||||
continent=["string"],
|
||||
date_end=[parse_datetime("2019-12-27T18:11:19.117Z")],
|
||||
date_range=["7d"],
|
||||
date_start=[parse_datetime("2019-12-27T18:11:19.117Z")],
|
||||
device_type=["DESKTOP"],
|
||||
format="JSON",
|
||||
http_protocol=["HTTP", "HTTPS"],
|
||||
http_version=["HTTPv1", "HTTPv2", "HTTPv3"],
|
||||
ip_version=["IPv4", "IPv6"],
|
||||
http_protocol=["HTTP"],
|
||||
http_version=["HTTPv1"],
|
||||
ip_version=["IPv4"],
|
||||
limit=5,
|
||||
location=["string", "string", "string"],
|
||||
name=["string", "string", "string"],
|
||||
os=["WINDOWS", "MACOSX", "IOS"],
|
||||
tls_version=["TLSv1_0", "TLSv1_1", "TLSv1_2"],
|
||||
location=["string"],
|
||||
name=["string"],
|
||||
os=["WINDOWS"],
|
||||
tls_version=["TLSv1_0"],
|
||||
)
|
||||
assert_matches_type(LocationGetResponse, location, path=["response"])
|
||||
|
||||
|
|
@ -86,31 +78,23 @@ class TestAsyncLocations:
|
|||
@parametrize
|
||||
async def test_method_get_with_all_params(self, async_client: AsyncCloudflare) -> None:
|
||||
location = await async_client.radar.http.locations.get(
|
||||
asn=["string", "string", "string"],
|
||||
bot_class=["LIKELY_AUTOMATED", "LIKELY_HUMAN"],
|
||||
browser_family=["CHROME", "EDGE", "FIREFOX"],
|
||||
continent=["string", "string", "string"],
|
||||
date_end=[
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
],
|
||||
date_range=["7d", "7d", "7d"],
|
||||
date_start=[
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
],
|
||||
device_type=["DESKTOP", "MOBILE", "OTHER"],
|
||||
asn=["string"],
|
||||
bot_class=["LIKELY_AUTOMATED"],
|
||||
browser_family=["CHROME"],
|
||||
continent=["string"],
|
||||
date_end=[parse_datetime("2019-12-27T18:11:19.117Z")],
|
||||
date_range=["7d"],
|
||||
date_start=[parse_datetime("2019-12-27T18:11:19.117Z")],
|
||||
device_type=["DESKTOP"],
|
||||
format="JSON",
|
||||
http_protocol=["HTTP", "HTTPS"],
|
||||
http_version=["HTTPv1", "HTTPv2", "HTTPv3"],
|
||||
ip_version=["IPv4", "IPv6"],
|
||||
http_protocol=["HTTP"],
|
||||
http_version=["HTTPv1"],
|
||||
ip_version=["IPv4"],
|
||||
limit=5,
|
||||
location=["string", "string", "string"],
|
||||
name=["string", "string", "string"],
|
||||
os=["WINDOWS", "MACOSX", "IOS"],
|
||||
tls_version=["TLSv1_0", "TLSv1_1", "TLSv1_2"],
|
||||
location=["string"],
|
||||
name=["string"],
|
||||
os=["WINDOWS"],
|
||||
tls_version=["TLSv1_0"],
|
||||
)
|
||||
assert_matches_type(LocationGetResponse, location, path=["response"])
|
||||
|
||||
|
|
|
|||
|
|
@ -35,28 +35,20 @@ class TestSummary:
|
|||
@parametrize
|
||||
def test_method_bot_class_with_all_params(self, client: Cloudflare) -> None:
|
||||
summary = client.radar.http.summary.bot_class(
|
||||
asn=["string", "string", "string"],
|
||||
continent=["string", "string", "string"],
|
||||
date_end=[
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
],
|
||||
date_range=["7d", "7d", "7d"],
|
||||
date_start=[
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
],
|
||||
device_type=["DESKTOP", "MOBILE", "OTHER"],
|
||||
asn=["string"],
|
||||
continent=["string"],
|
||||
date_end=[parse_datetime("2019-12-27T18:11:19.117Z")],
|
||||
date_range=["7d"],
|
||||
date_start=[parse_datetime("2019-12-27T18:11:19.117Z")],
|
||||
device_type=["DESKTOP"],
|
||||
format="JSON",
|
||||
http_protocol=["HTTP", "HTTPS"],
|
||||
http_version=["HTTPv1", "HTTPv2", "HTTPv3"],
|
||||
ip_version=["IPv4", "IPv6"],
|
||||
location=["string", "string", "string"],
|
||||
name=["string", "string", "string"],
|
||||
os=["WINDOWS", "MACOSX", "IOS"],
|
||||
tls_version=["TLSv1_0", "TLSv1_1", "TLSv1_2"],
|
||||
http_protocol=["HTTP"],
|
||||
http_version=["HTTPv1"],
|
||||
ip_version=["IPv4"],
|
||||
location=["string"],
|
||||
name=["string"],
|
||||
os=["WINDOWS"],
|
||||
tls_version=["TLSv1_0"],
|
||||
)
|
||||
assert_matches_type(SummaryBotClassResponse, summary, path=["response"])
|
||||
|
||||
|
|
@ -88,28 +80,20 @@ class TestSummary:
|
|||
@parametrize
|
||||
def test_method_device_type_with_all_params(self, client: Cloudflare) -> None:
|
||||
summary = client.radar.http.summary.device_type(
|
||||
asn=["string", "string", "string"],
|
||||
bot_class=["LIKELY_AUTOMATED", "LIKELY_HUMAN"],
|
||||
continent=["string", "string", "string"],
|
||||
date_end=[
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
],
|
||||
date_range=["7d", "7d", "7d"],
|
||||
date_start=[
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
],
|
||||
asn=["string"],
|
||||
bot_class=["LIKELY_AUTOMATED"],
|
||||
continent=["string"],
|
||||
date_end=[parse_datetime("2019-12-27T18:11:19.117Z")],
|
||||
date_range=["7d"],
|
||||
date_start=[parse_datetime("2019-12-27T18:11:19.117Z")],
|
||||
format="JSON",
|
||||
http_protocol=["HTTP", "HTTPS"],
|
||||
http_version=["HTTPv1", "HTTPv2", "HTTPv3"],
|
||||
ip_version=["IPv4", "IPv6"],
|
||||
location=["string", "string", "string"],
|
||||
name=["string", "string", "string"],
|
||||
os=["WINDOWS", "MACOSX", "IOS"],
|
||||
tls_version=["TLSv1_0", "TLSv1_1", "TLSv1_2"],
|
||||
http_protocol=["HTTP"],
|
||||
http_version=["HTTPv1"],
|
||||
ip_version=["IPv4"],
|
||||
location=["string"],
|
||||
name=["string"],
|
||||
os=["WINDOWS"],
|
||||
tls_version=["TLSv1_0"],
|
||||
)
|
||||
assert_matches_type(SummaryDeviceTypeResponse, summary, path=["response"])
|
||||
|
||||
|
|
@ -141,28 +125,20 @@ class TestSummary:
|
|||
@parametrize
|
||||
def test_method_http_protocol_with_all_params(self, client: Cloudflare) -> None:
|
||||
summary = client.radar.http.summary.http_protocol(
|
||||
asn=["string", "string", "string"],
|
||||
bot_class=["LIKELY_AUTOMATED", "LIKELY_HUMAN"],
|
||||
continent=["string", "string", "string"],
|
||||
date_end=[
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
],
|
||||
date_range=["7d", "7d", "7d"],
|
||||
date_start=[
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
],
|
||||
device_type=["DESKTOP", "MOBILE", "OTHER"],
|
||||
asn=["string"],
|
||||
bot_class=["LIKELY_AUTOMATED"],
|
||||
continent=["string"],
|
||||
date_end=[parse_datetime("2019-12-27T18:11:19.117Z")],
|
||||
date_range=["7d"],
|
||||
date_start=[parse_datetime("2019-12-27T18:11:19.117Z")],
|
||||
device_type=["DESKTOP"],
|
||||
format="JSON",
|
||||
http_version=["HTTPv1", "HTTPv2", "HTTPv3"],
|
||||
ip_version=["IPv4", "IPv6"],
|
||||
location=["string", "string", "string"],
|
||||
name=["string", "string", "string"],
|
||||
os=["WINDOWS", "MACOSX", "IOS"],
|
||||
tls_version=["TLSv1_0", "TLSv1_1", "TLSv1_2"],
|
||||
http_version=["HTTPv1"],
|
||||
ip_version=["IPv4"],
|
||||
location=["string"],
|
||||
name=["string"],
|
||||
os=["WINDOWS"],
|
||||
tls_version=["TLSv1_0"],
|
||||
)
|
||||
assert_matches_type(SummaryHTTPProtocolResponse, summary, path=["response"])
|
||||
|
||||
|
|
@ -194,28 +170,20 @@ class TestSummary:
|
|||
@parametrize
|
||||
def test_method_http_version_with_all_params(self, client: Cloudflare) -> None:
|
||||
summary = client.radar.http.summary.http_version(
|
||||
asn=["string", "string", "string"],
|
||||
bot_class=["LIKELY_AUTOMATED", "LIKELY_HUMAN"],
|
||||
continent=["string", "string", "string"],
|
||||
date_end=[
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
],
|
||||
date_range=["7d", "7d", "7d"],
|
||||
date_start=[
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
],
|
||||
device_type=["DESKTOP", "MOBILE", "OTHER"],
|
||||
asn=["string"],
|
||||
bot_class=["LIKELY_AUTOMATED"],
|
||||
continent=["string"],
|
||||
date_end=[parse_datetime("2019-12-27T18:11:19.117Z")],
|
||||
date_range=["7d"],
|
||||
date_start=[parse_datetime("2019-12-27T18:11:19.117Z")],
|
||||
device_type=["DESKTOP"],
|
||||
format="JSON",
|
||||
http_protocol=["HTTP", "HTTPS"],
|
||||
ip_version=["IPv4", "IPv6"],
|
||||
location=["string", "string", "string"],
|
||||
name=["string", "string", "string"],
|
||||
os=["WINDOWS", "MACOSX", "IOS"],
|
||||
tls_version=["TLSv1_0", "TLSv1_1", "TLSv1_2"],
|
||||
http_protocol=["HTTP"],
|
||||
ip_version=["IPv4"],
|
||||
location=["string"],
|
||||
name=["string"],
|
||||
os=["WINDOWS"],
|
||||
tls_version=["TLSv1_0"],
|
||||
)
|
||||
assert_matches_type(SummaryHTTPVersionResponse, summary, path=["response"])
|
||||
|
||||
|
|
@ -247,28 +215,20 @@ class TestSummary:
|
|||
@parametrize
|
||||
def test_method_ip_version_with_all_params(self, client: Cloudflare) -> None:
|
||||
summary = client.radar.http.summary.ip_version(
|
||||
asn=["string", "string", "string"],
|
||||
bot_class=["LIKELY_AUTOMATED", "LIKELY_HUMAN"],
|
||||
continent=["string", "string", "string"],
|
||||
date_end=[
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
],
|
||||
date_range=["7d", "7d", "7d"],
|
||||
date_start=[
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
],
|
||||
device_type=["DESKTOP", "MOBILE", "OTHER"],
|
||||
asn=["string"],
|
||||
bot_class=["LIKELY_AUTOMATED"],
|
||||
continent=["string"],
|
||||
date_end=[parse_datetime("2019-12-27T18:11:19.117Z")],
|
||||
date_range=["7d"],
|
||||
date_start=[parse_datetime("2019-12-27T18:11:19.117Z")],
|
||||
device_type=["DESKTOP"],
|
||||
format="JSON",
|
||||
http_protocol=["HTTP", "HTTPS"],
|
||||
http_version=["HTTPv1", "HTTPv2", "HTTPv3"],
|
||||
location=["string", "string", "string"],
|
||||
name=["string", "string", "string"],
|
||||
os=["WINDOWS", "MACOSX", "IOS"],
|
||||
tls_version=["TLSv1_0", "TLSv1_1", "TLSv1_2"],
|
||||
http_protocol=["HTTP"],
|
||||
http_version=["HTTPv1"],
|
||||
location=["string"],
|
||||
name=["string"],
|
||||
os=["WINDOWS"],
|
||||
tls_version=["TLSv1_0"],
|
||||
)
|
||||
assert_matches_type(SummaryIPVersionResponse, summary, path=["response"])
|
||||
|
||||
|
|
@ -300,28 +260,20 @@ class TestSummary:
|
|||
@parametrize
|
||||
def test_method_os_with_all_params(self, client: Cloudflare) -> None:
|
||||
summary = client.radar.http.summary.os(
|
||||
asn=["string", "string", "string"],
|
||||
bot_class=["LIKELY_AUTOMATED", "LIKELY_HUMAN"],
|
||||
continent=["string", "string", "string"],
|
||||
date_end=[
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
],
|
||||
date_range=["7d", "7d", "7d"],
|
||||
date_start=[
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
],
|
||||
device_type=["DESKTOP", "MOBILE", "OTHER"],
|
||||
asn=["string"],
|
||||
bot_class=["LIKELY_AUTOMATED"],
|
||||
continent=["string"],
|
||||
date_end=[parse_datetime("2019-12-27T18:11:19.117Z")],
|
||||
date_range=["7d"],
|
||||
date_start=[parse_datetime("2019-12-27T18:11:19.117Z")],
|
||||
device_type=["DESKTOP"],
|
||||
format="JSON",
|
||||
http_protocol=["HTTP", "HTTPS"],
|
||||
http_version=["HTTPv1", "HTTPv2", "HTTPv3"],
|
||||
ip_version=["IPv4", "IPv6"],
|
||||
location=["string", "string", "string"],
|
||||
name=["string", "string", "string"],
|
||||
tls_version=["TLSv1_0", "TLSv1_1", "TLSv1_2"],
|
||||
http_protocol=["HTTP"],
|
||||
http_version=["HTTPv1"],
|
||||
ip_version=["IPv4"],
|
||||
location=["string"],
|
||||
name=["string"],
|
||||
tls_version=["TLSv1_0"],
|
||||
)
|
||||
assert_matches_type(SummaryOSResponse, summary, path=["response"])
|
||||
|
||||
|
|
@ -353,29 +305,21 @@ class TestSummary:
|
|||
@parametrize
|
||||
def test_method_post_quantum_with_all_params(self, client: Cloudflare) -> None:
|
||||
summary = client.radar.http.summary.post_quantum(
|
||||
asn=["string", "string", "string"],
|
||||
bot_class=["LIKELY_AUTOMATED", "LIKELY_HUMAN"],
|
||||
continent=["string", "string", "string"],
|
||||
date_end=[
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
],
|
||||
date_range=["7d", "7d", "7d"],
|
||||
date_start=[
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
],
|
||||
device_type=["DESKTOP", "MOBILE", "OTHER"],
|
||||
asn=["string"],
|
||||
bot_class=["LIKELY_AUTOMATED"],
|
||||
continent=["string"],
|
||||
date_end=[parse_datetime("2019-12-27T18:11:19.117Z")],
|
||||
date_range=["7d"],
|
||||
date_start=[parse_datetime("2019-12-27T18:11:19.117Z")],
|
||||
device_type=["DESKTOP"],
|
||||
format="JSON",
|
||||
http_protocol=["HTTP", "HTTPS"],
|
||||
http_version=["HTTPv1", "HTTPv2", "HTTPv3"],
|
||||
ip_version=["IPv4", "IPv6"],
|
||||
location=["string", "string", "string"],
|
||||
name=["string", "string", "string"],
|
||||
os=["WINDOWS", "MACOSX", "IOS"],
|
||||
tls_version=["TLSv1_0", "TLSv1_1", "TLSv1_2"],
|
||||
http_protocol=["HTTP"],
|
||||
http_version=["HTTPv1"],
|
||||
ip_version=["IPv4"],
|
||||
location=["string"],
|
||||
name=["string"],
|
||||
os=["WINDOWS"],
|
||||
tls_version=["TLSv1_0"],
|
||||
)
|
||||
assert_matches_type(SummaryPostQuantumResponse, summary, path=["response"])
|
||||
|
||||
|
|
@ -407,28 +351,20 @@ class TestSummary:
|
|||
@parametrize
|
||||
def test_method_tls_version_with_all_params(self, client: Cloudflare) -> None:
|
||||
summary = client.radar.http.summary.tls_version(
|
||||
asn=["string", "string", "string"],
|
||||
bot_class=["LIKELY_AUTOMATED", "LIKELY_HUMAN"],
|
||||
continent=["string", "string", "string"],
|
||||
date_end=[
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
],
|
||||
date_range=["7d", "7d", "7d"],
|
||||
date_start=[
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
],
|
||||
device_type=["DESKTOP", "MOBILE", "OTHER"],
|
||||
asn=["string"],
|
||||
bot_class=["LIKELY_AUTOMATED"],
|
||||
continent=["string"],
|
||||
date_end=[parse_datetime("2019-12-27T18:11:19.117Z")],
|
||||
date_range=["7d"],
|
||||
date_start=[parse_datetime("2019-12-27T18:11:19.117Z")],
|
||||
device_type=["DESKTOP"],
|
||||
format="JSON",
|
||||
http_protocol=["HTTP", "HTTPS"],
|
||||
http_version=["HTTPv1", "HTTPv2", "HTTPv3"],
|
||||
ip_version=["IPv4", "IPv6"],
|
||||
location=["string", "string", "string"],
|
||||
name=["string", "string", "string"],
|
||||
os=["WINDOWS", "MACOSX", "IOS"],
|
||||
http_protocol=["HTTP"],
|
||||
http_version=["HTTPv1"],
|
||||
ip_version=["IPv4"],
|
||||
location=["string"],
|
||||
name=["string"],
|
||||
os=["WINDOWS"],
|
||||
)
|
||||
assert_matches_type(SummaryTLSVersionResponse, summary, path=["response"])
|
||||
|
||||
|
|
@ -464,28 +400,20 @@ class TestAsyncSummary:
|
|||
@parametrize
|
||||
async def test_method_bot_class_with_all_params(self, async_client: AsyncCloudflare) -> None:
|
||||
summary = await async_client.radar.http.summary.bot_class(
|
||||
asn=["string", "string", "string"],
|
||||
continent=["string", "string", "string"],
|
||||
date_end=[
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
],
|
||||
date_range=["7d", "7d", "7d"],
|
||||
date_start=[
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
],
|
||||
device_type=["DESKTOP", "MOBILE", "OTHER"],
|
||||
asn=["string"],
|
||||
continent=["string"],
|
||||
date_end=[parse_datetime("2019-12-27T18:11:19.117Z")],
|
||||
date_range=["7d"],
|
||||
date_start=[parse_datetime("2019-12-27T18:11:19.117Z")],
|
||||
device_type=["DESKTOP"],
|
||||
format="JSON",
|
||||
http_protocol=["HTTP", "HTTPS"],
|
||||
http_version=["HTTPv1", "HTTPv2", "HTTPv3"],
|
||||
ip_version=["IPv4", "IPv6"],
|
||||
location=["string", "string", "string"],
|
||||
name=["string", "string", "string"],
|
||||
os=["WINDOWS", "MACOSX", "IOS"],
|
||||
tls_version=["TLSv1_0", "TLSv1_1", "TLSv1_2"],
|
||||
http_protocol=["HTTP"],
|
||||
http_version=["HTTPv1"],
|
||||
ip_version=["IPv4"],
|
||||
location=["string"],
|
||||
name=["string"],
|
||||
os=["WINDOWS"],
|
||||
tls_version=["TLSv1_0"],
|
||||
)
|
||||
assert_matches_type(SummaryBotClassResponse, summary, path=["response"])
|
||||
|
||||
|
|
@ -517,28 +445,20 @@ class TestAsyncSummary:
|
|||
@parametrize
|
||||
async def test_method_device_type_with_all_params(self, async_client: AsyncCloudflare) -> None:
|
||||
summary = await async_client.radar.http.summary.device_type(
|
||||
asn=["string", "string", "string"],
|
||||
bot_class=["LIKELY_AUTOMATED", "LIKELY_HUMAN"],
|
||||
continent=["string", "string", "string"],
|
||||
date_end=[
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
],
|
||||
date_range=["7d", "7d", "7d"],
|
||||
date_start=[
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
],
|
||||
asn=["string"],
|
||||
bot_class=["LIKELY_AUTOMATED"],
|
||||
continent=["string"],
|
||||
date_end=[parse_datetime("2019-12-27T18:11:19.117Z")],
|
||||
date_range=["7d"],
|
||||
date_start=[parse_datetime("2019-12-27T18:11:19.117Z")],
|
||||
format="JSON",
|
||||
http_protocol=["HTTP", "HTTPS"],
|
||||
http_version=["HTTPv1", "HTTPv2", "HTTPv3"],
|
||||
ip_version=["IPv4", "IPv6"],
|
||||
location=["string", "string", "string"],
|
||||
name=["string", "string", "string"],
|
||||
os=["WINDOWS", "MACOSX", "IOS"],
|
||||
tls_version=["TLSv1_0", "TLSv1_1", "TLSv1_2"],
|
||||
http_protocol=["HTTP"],
|
||||
http_version=["HTTPv1"],
|
||||
ip_version=["IPv4"],
|
||||
location=["string"],
|
||||
name=["string"],
|
||||
os=["WINDOWS"],
|
||||
tls_version=["TLSv1_0"],
|
||||
)
|
||||
assert_matches_type(SummaryDeviceTypeResponse, summary, path=["response"])
|
||||
|
||||
|
|
@ -570,28 +490,20 @@ class TestAsyncSummary:
|
|||
@parametrize
|
||||
async def test_method_http_protocol_with_all_params(self, async_client: AsyncCloudflare) -> None:
|
||||
summary = await async_client.radar.http.summary.http_protocol(
|
||||
asn=["string", "string", "string"],
|
||||
bot_class=["LIKELY_AUTOMATED", "LIKELY_HUMAN"],
|
||||
continent=["string", "string", "string"],
|
||||
date_end=[
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
],
|
||||
date_range=["7d", "7d", "7d"],
|
||||
date_start=[
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
],
|
||||
device_type=["DESKTOP", "MOBILE", "OTHER"],
|
||||
asn=["string"],
|
||||
bot_class=["LIKELY_AUTOMATED"],
|
||||
continent=["string"],
|
||||
date_end=[parse_datetime("2019-12-27T18:11:19.117Z")],
|
||||
date_range=["7d"],
|
||||
date_start=[parse_datetime("2019-12-27T18:11:19.117Z")],
|
||||
device_type=["DESKTOP"],
|
||||
format="JSON",
|
||||
http_version=["HTTPv1", "HTTPv2", "HTTPv3"],
|
||||
ip_version=["IPv4", "IPv6"],
|
||||
location=["string", "string", "string"],
|
||||
name=["string", "string", "string"],
|
||||
os=["WINDOWS", "MACOSX", "IOS"],
|
||||
tls_version=["TLSv1_0", "TLSv1_1", "TLSv1_2"],
|
||||
http_version=["HTTPv1"],
|
||||
ip_version=["IPv4"],
|
||||
location=["string"],
|
||||
name=["string"],
|
||||
os=["WINDOWS"],
|
||||
tls_version=["TLSv1_0"],
|
||||
)
|
||||
assert_matches_type(SummaryHTTPProtocolResponse, summary, path=["response"])
|
||||
|
||||
|
|
@ -623,28 +535,20 @@ class TestAsyncSummary:
|
|||
@parametrize
|
||||
async def test_method_http_version_with_all_params(self, async_client: AsyncCloudflare) -> None:
|
||||
summary = await async_client.radar.http.summary.http_version(
|
||||
asn=["string", "string", "string"],
|
||||
bot_class=["LIKELY_AUTOMATED", "LIKELY_HUMAN"],
|
||||
continent=["string", "string", "string"],
|
||||
date_end=[
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
],
|
||||
date_range=["7d", "7d", "7d"],
|
||||
date_start=[
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
],
|
||||
device_type=["DESKTOP", "MOBILE", "OTHER"],
|
||||
asn=["string"],
|
||||
bot_class=["LIKELY_AUTOMATED"],
|
||||
continent=["string"],
|
||||
date_end=[parse_datetime("2019-12-27T18:11:19.117Z")],
|
||||
date_range=["7d"],
|
||||
date_start=[parse_datetime("2019-12-27T18:11:19.117Z")],
|
||||
device_type=["DESKTOP"],
|
||||
format="JSON",
|
||||
http_protocol=["HTTP", "HTTPS"],
|
||||
ip_version=["IPv4", "IPv6"],
|
||||
location=["string", "string", "string"],
|
||||
name=["string", "string", "string"],
|
||||
os=["WINDOWS", "MACOSX", "IOS"],
|
||||
tls_version=["TLSv1_0", "TLSv1_1", "TLSv1_2"],
|
||||
http_protocol=["HTTP"],
|
||||
ip_version=["IPv4"],
|
||||
location=["string"],
|
||||
name=["string"],
|
||||
os=["WINDOWS"],
|
||||
tls_version=["TLSv1_0"],
|
||||
)
|
||||
assert_matches_type(SummaryHTTPVersionResponse, summary, path=["response"])
|
||||
|
||||
|
|
@ -676,28 +580,20 @@ class TestAsyncSummary:
|
|||
@parametrize
|
||||
async def test_method_ip_version_with_all_params(self, async_client: AsyncCloudflare) -> None:
|
||||
summary = await async_client.radar.http.summary.ip_version(
|
||||
asn=["string", "string", "string"],
|
||||
bot_class=["LIKELY_AUTOMATED", "LIKELY_HUMAN"],
|
||||
continent=["string", "string", "string"],
|
||||
date_end=[
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
],
|
||||
date_range=["7d", "7d", "7d"],
|
||||
date_start=[
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
],
|
||||
device_type=["DESKTOP", "MOBILE", "OTHER"],
|
||||
asn=["string"],
|
||||
bot_class=["LIKELY_AUTOMATED"],
|
||||
continent=["string"],
|
||||
date_end=[parse_datetime("2019-12-27T18:11:19.117Z")],
|
||||
date_range=["7d"],
|
||||
date_start=[parse_datetime("2019-12-27T18:11:19.117Z")],
|
||||
device_type=["DESKTOP"],
|
||||
format="JSON",
|
||||
http_protocol=["HTTP", "HTTPS"],
|
||||
http_version=["HTTPv1", "HTTPv2", "HTTPv3"],
|
||||
location=["string", "string", "string"],
|
||||
name=["string", "string", "string"],
|
||||
os=["WINDOWS", "MACOSX", "IOS"],
|
||||
tls_version=["TLSv1_0", "TLSv1_1", "TLSv1_2"],
|
||||
http_protocol=["HTTP"],
|
||||
http_version=["HTTPv1"],
|
||||
location=["string"],
|
||||
name=["string"],
|
||||
os=["WINDOWS"],
|
||||
tls_version=["TLSv1_0"],
|
||||
)
|
||||
assert_matches_type(SummaryIPVersionResponse, summary, path=["response"])
|
||||
|
||||
|
|
@ -729,28 +625,20 @@ class TestAsyncSummary:
|
|||
@parametrize
|
||||
async def test_method_os_with_all_params(self, async_client: AsyncCloudflare) -> None:
|
||||
summary = await async_client.radar.http.summary.os(
|
||||
asn=["string", "string", "string"],
|
||||
bot_class=["LIKELY_AUTOMATED", "LIKELY_HUMAN"],
|
||||
continent=["string", "string", "string"],
|
||||
date_end=[
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
],
|
||||
date_range=["7d", "7d", "7d"],
|
||||
date_start=[
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
],
|
||||
device_type=["DESKTOP", "MOBILE", "OTHER"],
|
||||
asn=["string"],
|
||||
bot_class=["LIKELY_AUTOMATED"],
|
||||
continent=["string"],
|
||||
date_end=[parse_datetime("2019-12-27T18:11:19.117Z")],
|
||||
date_range=["7d"],
|
||||
date_start=[parse_datetime("2019-12-27T18:11:19.117Z")],
|
||||
device_type=["DESKTOP"],
|
||||
format="JSON",
|
||||
http_protocol=["HTTP", "HTTPS"],
|
||||
http_version=["HTTPv1", "HTTPv2", "HTTPv3"],
|
||||
ip_version=["IPv4", "IPv6"],
|
||||
location=["string", "string", "string"],
|
||||
name=["string", "string", "string"],
|
||||
tls_version=["TLSv1_0", "TLSv1_1", "TLSv1_2"],
|
||||
http_protocol=["HTTP"],
|
||||
http_version=["HTTPv1"],
|
||||
ip_version=["IPv4"],
|
||||
location=["string"],
|
||||
name=["string"],
|
||||
tls_version=["TLSv1_0"],
|
||||
)
|
||||
assert_matches_type(SummaryOSResponse, summary, path=["response"])
|
||||
|
||||
|
|
@ -782,29 +670,21 @@ class TestAsyncSummary:
|
|||
@parametrize
|
||||
async def test_method_post_quantum_with_all_params(self, async_client: AsyncCloudflare) -> None:
|
||||
summary = await async_client.radar.http.summary.post_quantum(
|
||||
asn=["string", "string", "string"],
|
||||
bot_class=["LIKELY_AUTOMATED", "LIKELY_HUMAN"],
|
||||
continent=["string", "string", "string"],
|
||||
date_end=[
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
],
|
||||
date_range=["7d", "7d", "7d"],
|
||||
date_start=[
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
],
|
||||
device_type=["DESKTOP", "MOBILE", "OTHER"],
|
||||
asn=["string"],
|
||||
bot_class=["LIKELY_AUTOMATED"],
|
||||
continent=["string"],
|
||||
date_end=[parse_datetime("2019-12-27T18:11:19.117Z")],
|
||||
date_range=["7d"],
|
||||
date_start=[parse_datetime("2019-12-27T18:11:19.117Z")],
|
||||
device_type=["DESKTOP"],
|
||||
format="JSON",
|
||||
http_protocol=["HTTP", "HTTPS"],
|
||||
http_version=["HTTPv1", "HTTPv2", "HTTPv3"],
|
||||
ip_version=["IPv4", "IPv6"],
|
||||
location=["string", "string", "string"],
|
||||
name=["string", "string", "string"],
|
||||
os=["WINDOWS", "MACOSX", "IOS"],
|
||||
tls_version=["TLSv1_0", "TLSv1_1", "TLSv1_2"],
|
||||
http_protocol=["HTTP"],
|
||||
http_version=["HTTPv1"],
|
||||
ip_version=["IPv4"],
|
||||
location=["string"],
|
||||
name=["string"],
|
||||
os=["WINDOWS"],
|
||||
tls_version=["TLSv1_0"],
|
||||
)
|
||||
assert_matches_type(SummaryPostQuantumResponse, summary, path=["response"])
|
||||
|
||||
|
|
@ -836,28 +716,20 @@ class TestAsyncSummary:
|
|||
@parametrize
|
||||
async def test_method_tls_version_with_all_params(self, async_client: AsyncCloudflare) -> None:
|
||||
summary = await async_client.radar.http.summary.tls_version(
|
||||
asn=["string", "string", "string"],
|
||||
bot_class=["LIKELY_AUTOMATED", "LIKELY_HUMAN"],
|
||||
continent=["string", "string", "string"],
|
||||
date_end=[
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
],
|
||||
date_range=["7d", "7d", "7d"],
|
||||
date_start=[
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
],
|
||||
device_type=["DESKTOP", "MOBILE", "OTHER"],
|
||||
asn=["string"],
|
||||
bot_class=["LIKELY_AUTOMATED"],
|
||||
continent=["string"],
|
||||
date_end=[parse_datetime("2019-12-27T18:11:19.117Z")],
|
||||
date_range=["7d"],
|
||||
date_start=[parse_datetime("2019-12-27T18:11:19.117Z")],
|
||||
device_type=["DESKTOP"],
|
||||
format="JSON",
|
||||
http_protocol=["HTTP", "HTTPS"],
|
||||
http_version=["HTTPv1", "HTTPv2", "HTTPv3"],
|
||||
ip_version=["IPv4", "IPv6"],
|
||||
location=["string", "string", "string"],
|
||||
name=["string", "string", "string"],
|
||||
os=["WINDOWS", "MACOSX", "IOS"],
|
||||
http_protocol=["HTTP"],
|
||||
http_version=["HTTPv1"],
|
||||
ip_version=["IPv4"],
|
||||
location=["string"],
|
||||
name=["string"],
|
||||
os=["WINDOWS"],
|
||||
)
|
||||
assert_matches_type(SummaryTLSVersionResponse, summary, path=["response"])
|
||||
|
||||
|
|
|
|||
|
|
@ -38,28 +38,20 @@ class TestTimeseriesGroups:
|
|||
def test_method_bot_class_with_all_params(self, client: Cloudflare) -> None:
|
||||
timeseries_group = client.radar.http.timeseries_groups.bot_class(
|
||||
agg_interval="15m",
|
||||
asn=["string", "string", "string"],
|
||||
continent=["string", "string", "string"],
|
||||
date_end=[
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
],
|
||||
date_range=["7d", "7d", "7d"],
|
||||
date_start=[
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
],
|
||||
device_type=["DESKTOP", "MOBILE", "OTHER"],
|
||||
asn=["string"],
|
||||
continent=["string"],
|
||||
date_end=[parse_datetime("2019-12-27T18:11:19.117Z")],
|
||||
date_range=["7d"],
|
||||
date_start=[parse_datetime("2019-12-27T18:11:19.117Z")],
|
||||
device_type=["DESKTOP"],
|
||||
format="JSON",
|
||||
http_protocol=["HTTP", "HTTPS"],
|
||||
http_version=["HTTPv1", "HTTPv2", "HTTPv3"],
|
||||
ip_version=["IPv4", "IPv6"],
|
||||
location=["string", "string", "string"],
|
||||
name=["string", "string", "string"],
|
||||
os=["WINDOWS", "MACOSX", "IOS"],
|
||||
tls_version=["TLSv1_0", "TLSv1_1", "TLSv1_2"],
|
||||
http_protocol=["HTTP"],
|
||||
http_version=["HTTPv1"],
|
||||
ip_version=["IPv4"],
|
||||
location=["string"],
|
||||
name=["string"],
|
||||
os=["WINDOWS"],
|
||||
tls_version=["TLSv1_0"],
|
||||
)
|
||||
assert_matches_type(TimeseriesGroupBotClassResponse, timeseries_group, path=["response"])
|
||||
|
||||
|
|
@ -92,30 +84,22 @@ class TestTimeseriesGroups:
|
|||
def test_method_browser_with_all_params(self, client: Cloudflare) -> None:
|
||||
timeseries_group = client.radar.http.timeseries_groups.browser(
|
||||
agg_interval="15m",
|
||||
asn=["string", "string", "string"],
|
||||
bot_class=["LIKELY_AUTOMATED", "LIKELY_HUMAN"],
|
||||
continent=["string", "string", "string"],
|
||||
date_end=[
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
],
|
||||
date_range=["7d", "7d", "7d"],
|
||||
date_start=[
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
],
|
||||
device_type=["DESKTOP", "MOBILE", "OTHER"],
|
||||
asn=["string"],
|
||||
bot_class=["LIKELY_AUTOMATED"],
|
||||
continent=["string"],
|
||||
date_end=[parse_datetime("2019-12-27T18:11:19.117Z")],
|
||||
date_range=["7d"],
|
||||
date_start=[parse_datetime("2019-12-27T18:11:19.117Z")],
|
||||
device_type=["DESKTOP"],
|
||||
format="JSON",
|
||||
http_protocol=["HTTP", "HTTPS"],
|
||||
http_version=["HTTPv1", "HTTPv2", "HTTPv3"],
|
||||
ip_version=["IPv4", "IPv6"],
|
||||
http_protocol=["HTTP"],
|
||||
http_version=["HTTPv1"],
|
||||
ip_version=["IPv4"],
|
||||
limit_per_group=4,
|
||||
location=["string", "string", "string"],
|
||||
name=["string", "string", "string"],
|
||||
os=["WINDOWS", "MACOSX", "IOS"],
|
||||
tls_version=["TLSv1_0", "TLSv1_1", "TLSv1_2"],
|
||||
location=["string"],
|
||||
name=["string"],
|
||||
os=["WINDOWS"],
|
||||
tls_version=["TLSv1_0"],
|
||||
)
|
||||
assert_matches_type(TimeseriesGroupBrowserResponse, timeseries_group, path=["response"])
|
||||
|
||||
|
|
@ -148,29 +132,21 @@ class TestTimeseriesGroups:
|
|||
def test_method_browser_family_with_all_params(self, client: Cloudflare) -> None:
|
||||
timeseries_group = client.radar.http.timeseries_groups.browser_family(
|
||||
agg_interval="15m",
|
||||
asn=["string", "string", "string"],
|
||||
bot_class=["LIKELY_AUTOMATED", "LIKELY_HUMAN"],
|
||||
continent=["string", "string", "string"],
|
||||
date_end=[
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
],
|
||||
date_range=["7d", "7d", "7d"],
|
||||
date_start=[
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
],
|
||||
device_type=["DESKTOP", "MOBILE", "OTHER"],
|
||||
asn=["string"],
|
||||
bot_class=["LIKELY_AUTOMATED"],
|
||||
continent=["string"],
|
||||
date_end=[parse_datetime("2019-12-27T18:11:19.117Z")],
|
||||
date_range=["7d"],
|
||||
date_start=[parse_datetime("2019-12-27T18:11:19.117Z")],
|
||||
device_type=["DESKTOP"],
|
||||
format="JSON",
|
||||
http_protocol=["HTTP", "HTTPS"],
|
||||
http_version=["HTTPv1", "HTTPv2", "HTTPv3"],
|
||||
ip_version=["IPv4", "IPv6"],
|
||||
location=["string", "string", "string"],
|
||||
name=["string", "string", "string"],
|
||||
os=["WINDOWS", "MACOSX", "IOS"],
|
||||
tls_version=["TLSv1_0", "TLSv1_1", "TLSv1_2"],
|
||||
http_protocol=["HTTP"],
|
||||
http_version=["HTTPv1"],
|
||||
ip_version=["IPv4"],
|
||||
location=["string"],
|
||||
name=["string"],
|
||||
os=["WINDOWS"],
|
||||
tls_version=["TLSv1_0"],
|
||||
)
|
||||
assert_matches_type(TimeseriesGroupBrowserFamilyResponse, timeseries_group, path=["response"])
|
||||
|
||||
|
|
@ -203,28 +179,20 @@ class TestTimeseriesGroups:
|
|||
def test_method_device_type_with_all_params(self, client: Cloudflare) -> None:
|
||||
timeseries_group = client.radar.http.timeseries_groups.device_type(
|
||||
agg_interval="15m",
|
||||
asn=["string", "string", "string"],
|
||||
bot_class=["LIKELY_AUTOMATED", "LIKELY_HUMAN"],
|
||||
continent=["string", "string", "string"],
|
||||
date_end=[
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
],
|
||||
date_range=["7d", "7d", "7d"],
|
||||
date_start=[
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
],
|
||||
asn=["string"],
|
||||
bot_class=["LIKELY_AUTOMATED"],
|
||||
continent=["string"],
|
||||
date_end=[parse_datetime("2019-12-27T18:11:19.117Z")],
|
||||
date_range=["7d"],
|
||||
date_start=[parse_datetime("2019-12-27T18:11:19.117Z")],
|
||||
format="JSON",
|
||||
http_protocol=["HTTP", "HTTPS"],
|
||||
http_version=["HTTPv1", "HTTPv2", "HTTPv3"],
|
||||
ip_version=["IPv4", "IPv6"],
|
||||
location=["string", "string", "string"],
|
||||
name=["string", "string", "string"],
|
||||
os=["WINDOWS", "MACOSX", "IOS"],
|
||||
tls_version=["TLSv1_0", "TLSv1_1", "TLSv1_2"],
|
||||
http_protocol=["HTTP"],
|
||||
http_version=["HTTPv1"],
|
||||
ip_version=["IPv4"],
|
||||
location=["string"],
|
||||
name=["string"],
|
||||
os=["WINDOWS"],
|
||||
tls_version=["TLSv1_0"],
|
||||
)
|
||||
assert_matches_type(TimeseriesGroupDeviceTypeResponse, timeseries_group, path=["response"])
|
||||
|
||||
|
|
@ -257,28 +225,20 @@ class TestTimeseriesGroups:
|
|||
def test_method_http_protocol_with_all_params(self, client: Cloudflare) -> None:
|
||||
timeseries_group = client.radar.http.timeseries_groups.http_protocol(
|
||||
agg_interval="15m",
|
||||
asn=["string", "string", "string"],
|
||||
bot_class=["LIKELY_AUTOMATED", "LIKELY_HUMAN"],
|
||||
continent=["string", "string", "string"],
|
||||
date_end=[
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
],
|
||||
date_range=["7d", "7d", "7d"],
|
||||
date_start=[
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
],
|
||||
device_type=["DESKTOP", "MOBILE", "OTHER"],
|
||||
asn=["string"],
|
||||
bot_class=["LIKELY_AUTOMATED"],
|
||||
continent=["string"],
|
||||
date_end=[parse_datetime("2019-12-27T18:11:19.117Z")],
|
||||
date_range=["7d"],
|
||||
date_start=[parse_datetime("2019-12-27T18:11:19.117Z")],
|
||||
device_type=["DESKTOP"],
|
||||
format="JSON",
|
||||
http_version=["HTTPv1", "HTTPv2", "HTTPv3"],
|
||||
ip_version=["IPv4", "IPv6"],
|
||||
location=["string", "string", "string"],
|
||||
name=["string", "string", "string"],
|
||||
os=["WINDOWS", "MACOSX", "IOS"],
|
||||
tls_version=["TLSv1_0", "TLSv1_1", "TLSv1_2"],
|
||||
http_version=["HTTPv1"],
|
||||
ip_version=["IPv4"],
|
||||
location=["string"],
|
||||
name=["string"],
|
||||
os=["WINDOWS"],
|
||||
tls_version=["TLSv1_0"],
|
||||
)
|
||||
assert_matches_type(TimeseriesGroupHTTPProtocolResponse, timeseries_group, path=["response"])
|
||||
|
||||
|
|
@ -311,28 +271,20 @@ class TestTimeseriesGroups:
|
|||
def test_method_http_version_with_all_params(self, client: Cloudflare) -> None:
|
||||
timeseries_group = client.radar.http.timeseries_groups.http_version(
|
||||
agg_interval="15m",
|
||||
asn=["string", "string", "string"],
|
||||
bot_class=["LIKELY_AUTOMATED", "LIKELY_HUMAN"],
|
||||
continent=["string", "string", "string"],
|
||||
date_end=[
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
],
|
||||
date_range=["7d", "7d", "7d"],
|
||||
date_start=[
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
],
|
||||
device_type=["DESKTOP", "MOBILE", "OTHER"],
|
||||
asn=["string"],
|
||||
bot_class=["LIKELY_AUTOMATED"],
|
||||
continent=["string"],
|
||||
date_end=[parse_datetime("2019-12-27T18:11:19.117Z")],
|
||||
date_range=["7d"],
|
||||
date_start=[parse_datetime("2019-12-27T18:11:19.117Z")],
|
||||
device_type=["DESKTOP"],
|
||||
format="JSON",
|
||||
http_protocol=["HTTP", "HTTPS"],
|
||||
ip_version=["IPv4", "IPv6"],
|
||||
location=["string", "string", "string"],
|
||||
name=["string", "string", "string"],
|
||||
os=["WINDOWS", "MACOSX", "IOS"],
|
||||
tls_version=["TLSv1_0", "TLSv1_1", "TLSv1_2"],
|
||||
http_protocol=["HTTP"],
|
||||
ip_version=["IPv4"],
|
||||
location=["string"],
|
||||
name=["string"],
|
||||
os=["WINDOWS"],
|
||||
tls_version=["TLSv1_0"],
|
||||
)
|
||||
assert_matches_type(TimeseriesGroupHTTPVersionResponse, timeseries_group, path=["response"])
|
||||
|
||||
|
|
@ -365,28 +317,20 @@ class TestTimeseriesGroups:
|
|||
def test_method_ip_version_with_all_params(self, client: Cloudflare) -> None:
|
||||
timeseries_group = client.radar.http.timeseries_groups.ip_version(
|
||||
agg_interval="15m",
|
||||
asn=["string", "string", "string"],
|
||||
bot_class=["LIKELY_AUTOMATED", "LIKELY_HUMAN"],
|
||||
continent=["string", "string", "string"],
|
||||
date_end=[
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
],
|
||||
date_range=["7d", "7d", "7d"],
|
||||
date_start=[
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
],
|
||||
device_type=["DESKTOP", "MOBILE", "OTHER"],
|
||||
asn=["string"],
|
||||
bot_class=["LIKELY_AUTOMATED"],
|
||||
continent=["string"],
|
||||
date_end=[parse_datetime("2019-12-27T18:11:19.117Z")],
|
||||
date_range=["7d"],
|
||||
date_start=[parse_datetime("2019-12-27T18:11:19.117Z")],
|
||||
device_type=["DESKTOP"],
|
||||
format="JSON",
|
||||
http_protocol=["HTTP", "HTTPS"],
|
||||
http_version=["HTTPv1", "HTTPv2", "HTTPv3"],
|
||||
location=["string", "string", "string"],
|
||||
name=["string", "string", "string"],
|
||||
os=["WINDOWS", "MACOSX", "IOS"],
|
||||
tls_version=["TLSv1_0", "TLSv1_1", "TLSv1_2"],
|
||||
http_protocol=["HTTP"],
|
||||
http_version=["HTTPv1"],
|
||||
location=["string"],
|
||||
name=["string"],
|
||||
os=["WINDOWS"],
|
||||
tls_version=["TLSv1_0"],
|
||||
)
|
||||
assert_matches_type(TimeseriesGroupIPVersionResponse, timeseries_group, path=["response"])
|
||||
|
||||
|
|
@ -419,28 +363,20 @@ class TestTimeseriesGroups:
|
|||
def test_method_os_with_all_params(self, client: Cloudflare) -> None:
|
||||
timeseries_group = client.radar.http.timeseries_groups.os(
|
||||
agg_interval="15m",
|
||||
asn=["string", "string", "string"],
|
||||
bot_class=["LIKELY_AUTOMATED", "LIKELY_HUMAN"],
|
||||
continent=["string", "string", "string"],
|
||||
date_end=[
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
],
|
||||
date_range=["7d", "7d", "7d"],
|
||||
date_start=[
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
],
|
||||
device_type=["DESKTOP", "MOBILE", "OTHER"],
|
||||
asn=["string"],
|
||||
bot_class=["LIKELY_AUTOMATED"],
|
||||
continent=["string"],
|
||||
date_end=[parse_datetime("2019-12-27T18:11:19.117Z")],
|
||||
date_range=["7d"],
|
||||
date_start=[parse_datetime("2019-12-27T18:11:19.117Z")],
|
||||
device_type=["DESKTOP"],
|
||||
format="JSON",
|
||||
http_protocol=["HTTP", "HTTPS"],
|
||||
http_version=["HTTPv1", "HTTPv2", "HTTPv3"],
|
||||
ip_version=["IPv4", "IPv6"],
|
||||
location=["string", "string", "string"],
|
||||
name=["string", "string", "string"],
|
||||
tls_version=["TLSv1_0", "TLSv1_1", "TLSv1_2"],
|
||||
http_protocol=["HTTP"],
|
||||
http_version=["HTTPv1"],
|
||||
ip_version=["IPv4"],
|
||||
location=["string"],
|
||||
name=["string"],
|
||||
tls_version=["TLSv1_0"],
|
||||
)
|
||||
assert_matches_type(TimeseriesGroupOSResponse, timeseries_group, path=["response"])
|
||||
|
||||
|
|
@ -473,29 +409,21 @@ class TestTimeseriesGroups:
|
|||
def test_method_post_quantum_with_all_params(self, client: Cloudflare) -> None:
|
||||
timeseries_group = client.radar.http.timeseries_groups.post_quantum(
|
||||
agg_interval="15m",
|
||||
asn=["string", "string", "string"],
|
||||
bot_class=["LIKELY_AUTOMATED", "LIKELY_HUMAN"],
|
||||
continent=["string", "string", "string"],
|
||||
date_end=[
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
],
|
||||
date_range=["7d", "7d", "7d"],
|
||||
date_start=[
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
],
|
||||
device_type=["DESKTOP", "MOBILE", "OTHER"],
|
||||
asn=["string"],
|
||||
bot_class=["LIKELY_AUTOMATED"],
|
||||
continent=["string"],
|
||||
date_end=[parse_datetime("2019-12-27T18:11:19.117Z")],
|
||||
date_range=["7d"],
|
||||
date_start=[parse_datetime("2019-12-27T18:11:19.117Z")],
|
||||
device_type=["DESKTOP"],
|
||||
format="JSON",
|
||||
http_protocol=["HTTP", "HTTPS"],
|
||||
http_version=["HTTPv1", "HTTPv2", "HTTPv3"],
|
||||
ip_version=["IPv4", "IPv6"],
|
||||
location=["string", "string", "string"],
|
||||
name=["string", "string", "string"],
|
||||
os=["WINDOWS", "MACOSX", "IOS"],
|
||||
tls_version=["TLSv1_0", "TLSv1_1", "TLSv1_2"],
|
||||
http_protocol=["HTTP"],
|
||||
http_version=["HTTPv1"],
|
||||
ip_version=["IPv4"],
|
||||
location=["string"],
|
||||
name=["string"],
|
||||
os=["WINDOWS"],
|
||||
tls_version=["TLSv1_0"],
|
||||
)
|
||||
assert_matches_type(TimeseriesGroupPostQuantumResponse, timeseries_group, path=["response"])
|
||||
|
||||
|
|
@ -528,28 +456,20 @@ class TestTimeseriesGroups:
|
|||
def test_method_tls_version_with_all_params(self, client: Cloudflare) -> None:
|
||||
timeseries_group = client.radar.http.timeseries_groups.tls_version(
|
||||
agg_interval="15m",
|
||||
asn=["string", "string", "string"],
|
||||
bot_class=["LIKELY_AUTOMATED", "LIKELY_HUMAN"],
|
||||
continent=["string", "string", "string"],
|
||||
date_end=[
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
],
|
||||
date_range=["7d", "7d", "7d"],
|
||||
date_start=[
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
],
|
||||
device_type=["DESKTOP", "MOBILE", "OTHER"],
|
||||
asn=["string"],
|
||||
bot_class=["LIKELY_AUTOMATED"],
|
||||
continent=["string"],
|
||||
date_end=[parse_datetime("2019-12-27T18:11:19.117Z")],
|
||||
date_range=["7d"],
|
||||
date_start=[parse_datetime("2019-12-27T18:11:19.117Z")],
|
||||
device_type=["DESKTOP"],
|
||||
format="JSON",
|
||||
http_protocol=["HTTP", "HTTPS"],
|
||||
http_version=["HTTPv1", "HTTPv2", "HTTPv3"],
|
||||
ip_version=["IPv4", "IPv6"],
|
||||
location=["string", "string", "string"],
|
||||
name=["string", "string", "string"],
|
||||
os=["WINDOWS", "MACOSX", "IOS"],
|
||||
http_protocol=["HTTP"],
|
||||
http_version=["HTTPv1"],
|
||||
ip_version=["IPv4"],
|
||||
location=["string"],
|
||||
name=["string"],
|
||||
os=["WINDOWS"],
|
||||
)
|
||||
assert_matches_type(TimeseriesGroupTLSVersionResponse, timeseries_group, path=["response"])
|
||||
|
||||
|
|
@ -586,28 +506,20 @@ class TestAsyncTimeseriesGroups:
|
|||
async def test_method_bot_class_with_all_params(self, async_client: AsyncCloudflare) -> None:
|
||||
timeseries_group = await async_client.radar.http.timeseries_groups.bot_class(
|
||||
agg_interval="15m",
|
||||
asn=["string", "string", "string"],
|
||||
continent=["string", "string", "string"],
|
||||
date_end=[
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
],
|
||||
date_range=["7d", "7d", "7d"],
|
||||
date_start=[
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
],
|
||||
device_type=["DESKTOP", "MOBILE", "OTHER"],
|
||||
asn=["string"],
|
||||
continent=["string"],
|
||||
date_end=[parse_datetime("2019-12-27T18:11:19.117Z")],
|
||||
date_range=["7d"],
|
||||
date_start=[parse_datetime("2019-12-27T18:11:19.117Z")],
|
||||
device_type=["DESKTOP"],
|
||||
format="JSON",
|
||||
http_protocol=["HTTP", "HTTPS"],
|
||||
http_version=["HTTPv1", "HTTPv2", "HTTPv3"],
|
||||
ip_version=["IPv4", "IPv6"],
|
||||
location=["string", "string", "string"],
|
||||
name=["string", "string", "string"],
|
||||
os=["WINDOWS", "MACOSX", "IOS"],
|
||||
tls_version=["TLSv1_0", "TLSv1_1", "TLSv1_2"],
|
||||
http_protocol=["HTTP"],
|
||||
http_version=["HTTPv1"],
|
||||
ip_version=["IPv4"],
|
||||
location=["string"],
|
||||
name=["string"],
|
||||
os=["WINDOWS"],
|
||||
tls_version=["TLSv1_0"],
|
||||
)
|
||||
assert_matches_type(TimeseriesGroupBotClassResponse, timeseries_group, path=["response"])
|
||||
|
||||
|
|
@ -640,30 +552,22 @@ class TestAsyncTimeseriesGroups:
|
|||
async def test_method_browser_with_all_params(self, async_client: AsyncCloudflare) -> None:
|
||||
timeseries_group = await async_client.radar.http.timeseries_groups.browser(
|
||||
agg_interval="15m",
|
||||
asn=["string", "string", "string"],
|
||||
bot_class=["LIKELY_AUTOMATED", "LIKELY_HUMAN"],
|
||||
continent=["string", "string", "string"],
|
||||
date_end=[
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
],
|
||||
date_range=["7d", "7d", "7d"],
|
||||
date_start=[
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
],
|
||||
device_type=["DESKTOP", "MOBILE", "OTHER"],
|
||||
asn=["string"],
|
||||
bot_class=["LIKELY_AUTOMATED"],
|
||||
continent=["string"],
|
||||
date_end=[parse_datetime("2019-12-27T18:11:19.117Z")],
|
||||
date_range=["7d"],
|
||||
date_start=[parse_datetime("2019-12-27T18:11:19.117Z")],
|
||||
device_type=["DESKTOP"],
|
||||
format="JSON",
|
||||
http_protocol=["HTTP", "HTTPS"],
|
||||
http_version=["HTTPv1", "HTTPv2", "HTTPv3"],
|
||||
ip_version=["IPv4", "IPv6"],
|
||||
http_protocol=["HTTP"],
|
||||
http_version=["HTTPv1"],
|
||||
ip_version=["IPv4"],
|
||||
limit_per_group=4,
|
||||
location=["string", "string", "string"],
|
||||
name=["string", "string", "string"],
|
||||
os=["WINDOWS", "MACOSX", "IOS"],
|
||||
tls_version=["TLSv1_0", "TLSv1_1", "TLSv1_2"],
|
||||
location=["string"],
|
||||
name=["string"],
|
||||
os=["WINDOWS"],
|
||||
tls_version=["TLSv1_0"],
|
||||
)
|
||||
assert_matches_type(TimeseriesGroupBrowserResponse, timeseries_group, path=["response"])
|
||||
|
||||
|
|
@ -696,29 +600,21 @@ class TestAsyncTimeseriesGroups:
|
|||
async def test_method_browser_family_with_all_params(self, async_client: AsyncCloudflare) -> None:
|
||||
timeseries_group = await async_client.radar.http.timeseries_groups.browser_family(
|
||||
agg_interval="15m",
|
||||
asn=["string", "string", "string"],
|
||||
bot_class=["LIKELY_AUTOMATED", "LIKELY_HUMAN"],
|
||||
continent=["string", "string", "string"],
|
||||
date_end=[
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
],
|
||||
date_range=["7d", "7d", "7d"],
|
||||
date_start=[
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
],
|
||||
device_type=["DESKTOP", "MOBILE", "OTHER"],
|
||||
asn=["string"],
|
||||
bot_class=["LIKELY_AUTOMATED"],
|
||||
continent=["string"],
|
||||
date_end=[parse_datetime("2019-12-27T18:11:19.117Z")],
|
||||
date_range=["7d"],
|
||||
date_start=[parse_datetime("2019-12-27T18:11:19.117Z")],
|
||||
device_type=["DESKTOP"],
|
||||
format="JSON",
|
||||
http_protocol=["HTTP", "HTTPS"],
|
||||
http_version=["HTTPv1", "HTTPv2", "HTTPv3"],
|
||||
ip_version=["IPv4", "IPv6"],
|
||||
location=["string", "string", "string"],
|
||||
name=["string", "string", "string"],
|
||||
os=["WINDOWS", "MACOSX", "IOS"],
|
||||
tls_version=["TLSv1_0", "TLSv1_1", "TLSv1_2"],
|
||||
http_protocol=["HTTP"],
|
||||
http_version=["HTTPv1"],
|
||||
ip_version=["IPv4"],
|
||||
location=["string"],
|
||||
name=["string"],
|
||||
os=["WINDOWS"],
|
||||
tls_version=["TLSv1_0"],
|
||||
)
|
||||
assert_matches_type(TimeseriesGroupBrowserFamilyResponse, timeseries_group, path=["response"])
|
||||
|
||||
|
|
@ -751,28 +647,20 @@ class TestAsyncTimeseriesGroups:
|
|||
async def test_method_device_type_with_all_params(self, async_client: AsyncCloudflare) -> None:
|
||||
timeseries_group = await async_client.radar.http.timeseries_groups.device_type(
|
||||
agg_interval="15m",
|
||||
asn=["string", "string", "string"],
|
||||
bot_class=["LIKELY_AUTOMATED", "LIKELY_HUMAN"],
|
||||
continent=["string", "string", "string"],
|
||||
date_end=[
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
],
|
||||
date_range=["7d", "7d", "7d"],
|
||||
date_start=[
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
],
|
||||
asn=["string"],
|
||||
bot_class=["LIKELY_AUTOMATED"],
|
||||
continent=["string"],
|
||||
date_end=[parse_datetime("2019-12-27T18:11:19.117Z")],
|
||||
date_range=["7d"],
|
||||
date_start=[parse_datetime("2019-12-27T18:11:19.117Z")],
|
||||
format="JSON",
|
||||
http_protocol=["HTTP", "HTTPS"],
|
||||
http_version=["HTTPv1", "HTTPv2", "HTTPv3"],
|
||||
ip_version=["IPv4", "IPv6"],
|
||||
location=["string", "string", "string"],
|
||||
name=["string", "string", "string"],
|
||||
os=["WINDOWS", "MACOSX", "IOS"],
|
||||
tls_version=["TLSv1_0", "TLSv1_1", "TLSv1_2"],
|
||||
http_protocol=["HTTP"],
|
||||
http_version=["HTTPv1"],
|
||||
ip_version=["IPv4"],
|
||||
location=["string"],
|
||||
name=["string"],
|
||||
os=["WINDOWS"],
|
||||
tls_version=["TLSv1_0"],
|
||||
)
|
||||
assert_matches_type(TimeseriesGroupDeviceTypeResponse, timeseries_group, path=["response"])
|
||||
|
||||
|
|
@ -805,28 +693,20 @@ class TestAsyncTimeseriesGroups:
|
|||
async def test_method_http_protocol_with_all_params(self, async_client: AsyncCloudflare) -> None:
|
||||
timeseries_group = await async_client.radar.http.timeseries_groups.http_protocol(
|
||||
agg_interval="15m",
|
||||
asn=["string", "string", "string"],
|
||||
bot_class=["LIKELY_AUTOMATED", "LIKELY_HUMAN"],
|
||||
continent=["string", "string", "string"],
|
||||
date_end=[
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
],
|
||||
date_range=["7d", "7d", "7d"],
|
||||
date_start=[
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
],
|
||||
device_type=["DESKTOP", "MOBILE", "OTHER"],
|
||||
asn=["string"],
|
||||
bot_class=["LIKELY_AUTOMATED"],
|
||||
continent=["string"],
|
||||
date_end=[parse_datetime("2019-12-27T18:11:19.117Z")],
|
||||
date_range=["7d"],
|
||||
date_start=[parse_datetime("2019-12-27T18:11:19.117Z")],
|
||||
device_type=["DESKTOP"],
|
||||
format="JSON",
|
||||
http_version=["HTTPv1", "HTTPv2", "HTTPv3"],
|
||||
ip_version=["IPv4", "IPv6"],
|
||||
location=["string", "string", "string"],
|
||||
name=["string", "string", "string"],
|
||||
os=["WINDOWS", "MACOSX", "IOS"],
|
||||
tls_version=["TLSv1_0", "TLSv1_1", "TLSv1_2"],
|
||||
http_version=["HTTPv1"],
|
||||
ip_version=["IPv4"],
|
||||
location=["string"],
|
||||
name=["string"],
|
||||
os=["WINDOWS"],
|
||||
tls_version=["TLSv1_0"],
|
||||
)
|
||||
assert_matches_type(TimeseriesGroupHTTPProtocolResponse, timeseries_group, path=["response"])
|
||||
|
||||
|
|
@ -859,28 +739,20 @@ class TestAsyncTimeseriesGroups:
|
|||
async def test_method_http_version_with_all_params(self, async_client: AsyncCloudflare) -> None:
|
||||
timeseries_group = await async_client.radar.http.timeseries_groups.http_version(
|
||||
agg_interval="15m",
|
||||
asn=["string", "string", "string"],
|
||||
bot_class=["LIKELY_AUTOMATED", "LIKELY_HUMAN"],
|
||||
continent=["string", "string", "string"],
|
||||
date_end=[
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
],
|
||||
date_range=["7d", "7d", "7d"],
|
||||
date_start=[
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
],
|
||||
device_type=["DESKTOP", "MOBILE", "OTHER"],
|
||||
asn=["string"],
|
||||
bot_class=["LIKELY_AUTOMATED"],
|
||||
continent=["string"],
|
||||
date_end=[parse_datetime("2019-12-27T18:11:19.117Z")],
|
||||
date_range=["7d"],
|
||||
date_start=[parse_datetime("2019-12-27T18:11:19.117Z")],
|
||||
device_type=["DESKTOP"],
|
||||
format="JSON",
|
||||
http_protocol=["HTTP", "HTTPS"],
|
||||
ip_version=["IPv4", "IPv6"],
|
||||
location=["string", "string", "string"],
|
||||
name=["string", "string", "string"],
|
||||
os=["WINDOWS", "MACOSX", "IOS"],
|
||||
tls_version=["TLSv1_0", "TLSv1_1", "TLSv1_2"],
|
||||
http_protocol=["HTTP"],
|
||||
ip_version=["IPv4"],
|
||||
location=["string"],
|
||||
name=["string"],
|
||||
os=["WINDOWS"],
|
||||
tls_version=["TLSv1_0"],
|
||||
)
|
||||
assert_matches_type(TimeseriesGroupHTTPVersionResponse, timeseries_group, path=["response"])
|
||||
|
||||
|
|
@ -913,28 +785,20 @@ class TestAsyncTimeseriesGroups:
|
|||
async def test_method_ip_version_with_all_params(self, async_client: AsyncCloudflare) -> None:
|
||||
timeseries_group = await async_client.radar.http.timeseries_groups.ip_version(
|
||||
agg_interval="15m",
|
||||
asn=["string", "string", "string"],
|
||||
bot_class=["LIKELY_AUTOMATED", "LIKELY_HUMAN"],
|
||||
continent=["string", "string", "string"],
|
||||
date_end=[
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
],
|
||||
date_range=["7d", "7d", "7d"],
|
||||
date_start=[
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
],
|
||||
device_type=["DESKTOP", "MOBILE", "OTHER"],
|
||||
asn=["string"],
|
||||
bot_class=["LIKELY_AUTOMATED"],
|
||||
continent=["string"],
|
||||
date_end=[parse_datetime("2019-12-27T18:11:19.117Z")],
|
||||
date_range=["7d"],
|
||||
date_start=[parse_datetime("2019-12-27T18:11:19.117Z")],
|
||||
device_type=["DESKTOP"],
|
||||
format="JSON",
|
||||
http_protocol=["HTTP", "HTTPS"],
|
||||
http_version=["HTTPv1", "HTTPv2", "HTTPv3"],
|
||||
location=["string", "string", "string"],
|
||||
name=["string", "string", "string"],
|
||||
os=["WINDOWS", "MACOSX", "IOS"],
|
||||
tls_version=["TLSv1_0", "TLSv1_1", "TLSv1_2"],
|
||||
http_protocol=["HTTP"],
|
||||
http_version=["HTTPv1"],
|
||||
location=["string"],
|
||||
name=["string"],
|
||||
os=["WINDOWS"],
|
||||
tls_version=["TLSv1_0"],
|
||||
)
|
||||
assert_matches_type(TimeseriesGroupIPVersionResponse, timeseries_group, path=["response"])
|
||||
|
||||
|
|
@ -967,28 +831,20 @@ class TestAsyncTimeseriesGroups:
|
|||
async def test_method_os_with_all_params(self, async_client: AsyncCloudflare) -> None:
|
||||
timeseries_group = await async_client.radar.http.timeseries_groups.os(
|
||||
agg_interval="15m",
|
||||
asn=["string", "string", "string"],
|
||||
bot_class=["LIKELY_AUTOMATED", "LIKELY_HUMAN"],
|
||||
continent=["string", "string", "string"],
|
||||
date_end=[
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
],
|
||||
date_range=["7d", "7d", "7d"],
|
||||
date_start=[
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
],
|
||||
device_type=["DESKTOP", "MOBILE", "OTHER"],
|
||||
asn=["string"],
|
||||
bot_class=["LIKELY_AUTOMATED"],
|
||||
continent=["string"],
|
||||
date_end=[parse_datetime("2019-12-27T18:11:19.117Z")],
|
||||
date_range=["7d"],
|
||||
date_start=[parse_datetime("2019-12-27T18:11:19.117Z")],
|
||||
device_type=["DESKTOP"],
|
||||
format="JSON",
|
||||
http_protocol=["HTTP", "HTTPS"],
|
||||
http_version=["HTTPv1", "HTTPv2", "HTTPv3"],
|
||||
ip_version=["IPv4", "IPv6"],
|
||||
location=["string", "string", "string"],
|
||||
name=["string", "string", "string"],
|
||||
tls_version=["TLSv1_0", "TLSv1_1", "TLSv1_2"],
|
||||
http_protocol=["HTTP"],
|
||||
http_version=["HTTPv1"],
|
||||
ip_version=["IPv4"],
|
||||
location=["string"],
|
||||
name=["string"],
|
||||
tls_version=["TLSv1_0"],
|
||||
)
|
||||
assert_matches_type(TimeseriesGroupOSResponse, timeseries_group, path=["response"])
|
||||
|
||||
|
|
@ -1021,29 +877,21 @@ class TestAsyncTimeseriesGroups:
|
|||
async def test_method_post_quantum_with_all_params(self, async_client: AsyncCloudflare) -> None:
|
||||
timeseries_group = await async_client.radar.http.timeseries_groups.post_quantum(
|
||||
agg_interval="15m",
|
||||
asn=["string", "string", "string"],
|
||||
bot_class=["LIKELY_AUTOMATED", "LIKELY_HUMAN"],
|
||||
continent=["string", "string", "string"],
|
||||
date_end=[
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
],
|
||||
date_range=["7d", "7d", "7d"],
|
||||
date_start=[
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
],
|
||||
device_type=["DESKTOP", "MOBILE", "OTHER"],
|
||||
asn=["string"],
|
||||
bot_class=["LIKELY_AUTOMATED"],
|
||||
continent=["string"],
|
||||
date_end=[parse_datetime("2019-12-27T18:11:19.117Z")],
|
||||
date_range=["7d"],
|
||||
date_start=[parse_datetime("2019-12-27T18:11:19.117Z")],
|
||||
device_type=["DESKTOP"],
|
||||
format="JSON",
|
||||
http_protocol=["HTTP", "HTTPS"],
|
||||
http_version=["HTTPv1", "HTTPv2", "HTTPv3"],
|
||||
ip_version=["IPv4", "IPv6"],
|
||||
location=["string", "string", "string"],
|
||||
name=["string", "string", "string"],
|
||||
os=["WINDOWS", "MACOSX", "IOS"],
|
||||
tls_version=["TLSv1_0", "TLSv1_1", "TLSv1_2"],
|
||||
http_protocol=["HTTP"],
|
||||
http_version=["HTTPv1"],
|
||||
ip_version=["IPv4"],
|
||||
location=["string"],
|
||||
name=["string"],
|
||||
os=["WINDOWS"],
|
||||
tls_version=["TLSv1_0"],
|
||||
)
|
||||
assert_matches_type(TimeseriesGroupPostQuantumResponse, timeseries_group, path=["response"])
|
||||
|
||||
|
|
@ -1076,28 +924,20 @@ class TestAsyncTimeseriesGroups:
|
|||
async def test_method_tls_version_with_all_params(self, async_client: AsyncCloudflare) -> None:
|
||||
timeseries_group = await async_client.radar.http.timeseries_groups.tls_version(
|
||||
agg_interval="15m",
|
||||
asn=["string", "string", "string"],
|
||||
bot_class=["LIKELY_AUTOMATED", "LIKELY_HUMAN"],
|
||||
continent=["string", "string", "string"],
|
||||
date_end=[
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
],
|
||||
date_range=["7d", "7d", "7d"],
|
||||
date_start=[
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
],
|
||||
device_type=["DESKTOP", "MOBILE", "OTHER"],
|
||||
asn=["string"],
|
||||
bot_class=["LIKELY_AUTOMATED"],
|
||||
continent=["string"],
|
||||
date_end=[parse_datetime("2019-12-27T18:11:19.117Z")],
|
||||
date_range=["7d"],
|
||||
date_start=[parse_datetime("2019-12-27T18:11:19.117Z")],
|
||||
device_type=["DESKTOP"],
|
||||
format="JSON",
|
||||
http_protocol=["HTTP", "HTTPS"],
|
||||
http_version=["HTTPv1", "HTTPv2", "HTTPv3"],
|
||||
ip_version=["IPv4", "IPv6"],
|
||||
location=["string", "string", "string"],
|
||||
name=["string", "string", "string"],
|
||||
os=["WINDOWS", "MACOSX", "IOS"],
|
||||
http_protocol=["HTTP"],
|
||||
http_version=["HTTPv1"],
|
||||
ip_version=["IPv4"],
|
||||
location=["string"],
|
||||
name=["string"],
|
||||
os=["WINDOWS"],
|
||||
)
|
||||
assert_matches_type(TimeseriesGroupTLSVersionResponse, timeseries_group, path=["response"])
|
||||
|
||||
|
|
|
|||
|
|
@ -29,31 +29,23 @@ class TestTop:
|
|||
@parametrize
|
||||
def test_method_browser_with_all_params(self, client: Cloudflare) -> None:
|
||||
top = client.radar.http.top.browser(
|
||||
asn=["string", "string", "string"],
|
||||
bot_class=["LIKELY_AUTOMATED", "LIKELY_HUMAN"],
|
||||
browser_family=["CHROME", "EDGE", "FIREFOX"],
|
||||
continent=["string", "string", "string"],
|
||||
date_end=[
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
],
|
||||
date_range=["7d", "7d", "7d"],
|
||||
date_start=[
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
],
|
||||
device_type=["DESKTOP", "MOBILE", "OTHER"],
|
||||
asn=["string"],
|
||||
bot_class=["LIKELY_AUTOMATED"],
|
||||
browser_family=["CHROME"],
|
||||
continent=["string"],
|
||||
date_end=[parse_datetime("2019-12-27T18:11:19.117Z")],
|
||||
date_range=["7d"],
|
||||
date_start=[parse_datetime("2019-12-27T18:11:19.117Z")],
|
||||
device_type=["DESKTOP"],
|
||||
format="JSON",
|
||||
http_protocol=["HTTP", "HTTPS"],
|
||||
http_version=["HTTPv1", "HTTPv2", "HTTPv3"],
|
||||
ip_version=["IPv4", "IPv6"],
|
||||
http_protocol=["HTTP"],
|
||||
http_version=["HTTPv1"],
|
||||
ip_version=["IPv4"],
|
||||
limit=5,
|
||||
location=["string", "string", "string"],
|
||||
name=["string", "string", "string"],
|
||||
os=["WINDOWS", "MACOSX", "IOS"],
|
||||
tls_version=["TLSv1_0", "TLSv1_1", "TLSv1_2"],
|
||||
location=["string"],
|
||||
name=["string"],
|
||||
os=["WINDOWS"],
|
||||
tls_version=["TLSv1_0"],
|
||||
)
|
||||
assert_matches_type(TopBrowserResponse, top, path=["response"])
|
||||
|
||||
|
|
@ -85,31 +77,23 @@ class TestTop:
|
|||
@parametrize
|
||||
def test_method_browser_family_with_all_params(self, client: Cloudflare) -> None:
|
||||
top = client.radar.http.top.browser_family(
|
||||
asn=["string", "string", "string"],
|
||||
bot_class=["LIKELY_AUTOMATED", "LIKELY_HUMAN"],
|
||||
browser_family=["CHROME", "EDGE", "FIREFOX"],
|
||||
continent=["string", "string", "string"],
|
||||
date_end=[
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
],
|
||||
date_range=["7d", "7d", "7d"],
|
||||
date_start=[
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
],
|
||||
device_type=["DESKTOP", "MOBILE", "OTHER"],
|
||||
asn=["string"],
|
||||
bot_class=["LIKELY_AUTOMATED"],
|
||||
browser_family=["CHROME"],
|
||||
continent=["string"],
|
||||
date_end=[parse_datetime("2019-12-27T18:11:19.117Z")],
|
||||
date_range=["7d"],
|
||||
date_start=[parse_datetime("2019-12-27T18:11:19.117Z")],
|
||||
device_type=["DESKTOP"],
|
||||
format="JSON",
|
||||
http_protocol=["HTTP", "HTTPS"],
|
||||
http_version=["HTTPv1", "HTTPv2", "HTTPv3"],
|
||||
ip_version=["IPv4", "IPv6"],
|
||||
http_protocol=["HTTP"],
|
||||
http_version=["HTTPv1"],
|
||||
ip_version=["IPv4"],
|
||||
limit=5,
|
||||
location=["string", "string", "string"],
|
||||
name=["string", "string", "string"],
|
||||
os=["WINDOWS", "MACOSX", "IOS"],
|
||||
tls_version=["TLSv1_0", "TLSv1_1", "TLSv1_2"],
|
||||
location=["string"],
|
||||
name=["string"],
|
||||
os=["WINDOWS"],
|
||||
tls_version=["TLSv1_0"],
|
||||
)
|
||||
assert_matches_type(TopBrowserFamilyResponse, top, path=["response"])
|
||||
|
||||
|
|
@ -145,31 +129,23 @@ class TestAsyncTop:
|
|||
@parametrize
|
||||
async def test_method_browser_with_all_params(self, async_client: AsyncCloudflare) -> None:
|
||||
top = await async_client.radar.http.top.browser(
|
||||
asn=["string", "string", "string"],
|
||||
bot_class=["LIKELY_AUTOMATED", "LIKELY_HUMAN"],
|
||||
browser_family=["CHROME", "EDGE", "FIREFOX"],
|
||||
continent=["string", "string", "string"],
|
||||
date_end=[
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
],
|
||||
date_range=["7d", "7d", "7d"],
|
||||
date_start=[
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
],
|
||||
device_type=["DESKTOP", "MOBILE", "OTHER"],
|
||||
asn=["string"],
|
||||
bot_class=["LIKELY_AUTOMATED"],
|
||||
browser_family=["CHROME"],
|
||||
continent=["string"],
|
||||
date_end=[parse_datetime("2019-12-27T18:11:19.117Z")],
|
||||
date_range=["7d"],
|
||||
date_start=[parse_datetime("2019-12-27T18:11:19.117Z")],
|
||||
device_type=["DESKTOP"],
|
||||
format="JSON",
|
||||
http_protocol=["HTTP", "HTTPS"],
|
||||
http_version=["HTTPv1", "HTTPv2", "HTTPv3"],
|
||||
ip_version=["IPv4", "IPv6"],
|
||||
http_protocol=["HTTP"],
|
||||
http_version=["HTTPv1"],
|
||||
ip_version=["IPv4"],
|
||||
limit=5,
|
||||
location=["string", "string", "string"],
|
||||
name=["string", "string", "string"],
|
||||
os=["WINDOWS", "MACOSX", "IOS"],
|
||||
tls_version=["TLSv1_0", "TLSv1_1", "TLSv1_2"],
|
||||
location=["string"],
|
||||
name=["string"],
|
||||
os=["WINDOWS"],
|
||||
tls_version=["TLSv1_0"],
|
||||
)
|
||||
assert_matches_type(TopBrowserResponse, top, path=["response"])
|
||||
|
||||
|
|
@ -201,31 +177,23 @@ class TestAsyncTop:
|
|||
@parametrize
|
||||
async def test_method_browser_family_with_all_params(self, async_client: AsyncCloudflare) -> None:
|
||||
top = await async_client.radar.http.top.browser_family(
|
||||
asn=["string", "string", "string"],
|
||||
bot_class=["LIKELY_AUTOMATED", "LIKELY_HUMAN"],
|
||||
browser_family=["CHROME", "EDGE", "FIREFOX"],
|
||||
continent=["string", "string", "string"],
|
||||
date_end=[
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
],
|
||||
date_range=["7d", "7d", "7d"],
|
||||
date_start=[
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
],
|
||||
device_type=["DESKTOP", "MOBILE", "OTHER"],
|
||||
asn=["string"],
|
||||
bot_class=["LIKELY_AUTOMATED"],
|
||||
browser_family=["CHROME"],
|
||||
continent=["string"],
|
||||
date_end=[parse_datetime("2019-12-27T18:11:19.117Z")],
|
||||
date_range=["7d"],
|
||||
date_start=[parse_datetime("2019-12-27T18:11:19.117Z")],
|
||||
device_type=["DESKTOP"],
|
||||
format="JSON",
|
||||
http_protocol=["HTTP", "HTTPS"],
|
||||
http_version=["HTTPv1", "HTTPv2", "HTTPv3"],
|
||||
ip_version=["IPv4", "IPv6"],
|
||||
http_protocol=["HTTP"],
|
||||
http_version=["HTTPv1"],
|
||||
ip_version=["IPv4"],
|
||||
limit=5,
|
||||
location=["string", "string", "string"],
|
||||
name=["string", "string", "string"],
|
||||
os=["WINDOWS", "MACOSX", "IOS"],
|
||||
tls_version=["TLSv1_0", "TLSv1_1", "TLSv1_2"],
|
||||
location=["string"],
|
||||
name=["string"],
|
||||
os=["WINDOWS"],
|
||||
tls_version=["TLSv1_0"],
|
||||
)
|
||||
assert_matches_type(TopBrowserFamilyResponse, top, path=["response"])
|
||||
|
||||
|
|
|
|||
|
|
@ -26,23 +26,15 @@ class TestTop:
|
|||
@parametrize
|
||||
def test_method_ases_with_all_params(self, client: Cloudflare) -> None:
|
||||
top = client.radar.netflows.top.ases(
|
||||
asn=["string", "string", "string"],
|
||||
continent=["string", "string", "string"],
|
||||
date_end=[
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
],
|
||||
date_range=["7d", "7d", "7d"],
|
||||
date_start=[
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
],
|
||||
asn=["string"],
|
||||
continent=["string"],
|
||||
date_end=[parse_datetime("2019-12-27T18:11:19.117Z")],
|
||||
date_range=["7d"],
|
||||
date_start=[parse_datetime("2019-12-27T18:11:19.117Z")],
|
||||
format="JSON",
|
||||
limit=5,
|
||||
location=["string", "string", "string"],
|
||||
name=["string", "string", "string"],
|
||||
location=["string"],
|
||||
name=["string"],
|
||||
)
|
||||
assert_matches_type(TopAsesResponse, top, path=["response"])
|
||||
|
||||
|
|
@ -74,23 +66,15 @@ class TestTop:
|
|||
@parametrize
|
||||
def test_method_locations_with_all_params(self, client: Cloudflare) -> None:
|
||||
top = client.radar.netflows.top.locations(
|
||||
asn=["string", "string", "string"],
|
||||
continent=["string", "string", "string"],
|
||||
date_end=[
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
],
|
||||
date_range=["7d", "7d", "7d"],
|
||||
date_start=[
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
],
|
||||
asn=["string"],
|
||||
continent=["string"],
|
||||
date_end=[parse_datetime("2019-12-27T18:11:19.117Z")],
|
||||
date_range=["7d"],
|
||||
date_start=[parse_datetime("2019-12-27T18:11:19.117Z")],
|
||||
format="JSON",
|
||||
limit=5,
|
||||
location=["string", "string", "string"],
|
||||
name=["string", "string", "string"],
|
||||
location=["string"],
|
||||
name=["string"],
|
||||
)
|
||||
assert_matches_type(TopLocationsResponse, top, path=["response"])
|
||||
|
||||
|
|
@ -126,23 +110,15 @@ class TestAsyncTop:
|
|||
@parametrize
|
||||
async def test_method_ases_with_all_params(self, async_client: AsyncCloudflare) -> None:
|
||||
top = await async_client.radar.netflows.top.ases(
|
||||
asn=["string", "string", "string"],
|
||||
continent=["string", "string", "string"],
|
||||
date_end=[
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
],
|
||||
date_range=["7d", "7d", "7d"],
|
||||
date_start=[
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
],
|
||||
asn=["string"],
|
||||
continent=["string"],
|
||||
date_end=[parse_datetime("2019-12-27T18:11:19.117Z")],
|
||||
date_range=["7d"],
|
||||
date_start=[parse_datetime("2019-12-27T18:11:19.117Z")],
|
||||
format="JSON",
|
||||
limit=5,
|
||||
location=["string", "string", "string"],
|
||||
name=["string", "string", "string"],
|
||||
location=["string"],
|
||||
name=["string"],
|
||||
)
|
||||
assert_matches_type(TopAsesResponse, top, path=["response"])
|
||||
|
||||
|
|
@ -174,23 +150,15 @@ class TestAsyncTop:
|
|||
@parametrize
|
||||
async def test_method_locations_with_all_params(self, async_client: AsyncCloudflare) -> None:
|
||||
top = await async_client.radar.netflows.top.locations(
|
||||
asn=["string", "string", "string"],
|
||||
continent=["string", "string", "string"],
|
||||
date_end=[
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
],
|
||||
date_range=["7d", "7d", "7d"],
|
||||
date_start=[
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
],
|
||||
asn=["string"],
|
||||
continent=["string"],
|
||||
date_end=[parse_datetime("2019-12-27T18:11:19.117Z")],
|
||||
date_range=["7d"],
|
||||
date_start=[parse_datetime("2019-12-27T18:11:19.117Z")],
|
||||
format="JSON",
|
||||
limit=5,
|
||||
location=["string", "string", "string"],
|
||||
name=["string", "string", "string"],
|
||||
location=["string"],
|
||||
name=["string"],
|
||||
)
|
||||
assert_matches_type(TopLocationsResponse, top, path=["response"])
|
||||
|
||||
|
|
|
|||
|
|
@ -29,17 +29,13 @@ class TestTop:
|
|||
@parametrize
|
||||
def test_method_ases_with_all_params(self, client: Cloudflare) -> None:
|
||||
top = client.radar.quality.speed.top.ases(
|
||||
asn=["string", "string", "string"],
|
||||
continent=["string", "string", "string"],
|
||||
date_end=[
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
],
|
||||
asn=["string"],
|
||||
continent=["string"],
|
||||
date_end=[parse_datetime("2019-12-27T18:11:19.117Z")],
|
||||
format="JSON",
|
||||
limit=5,
|
||||
location=["string", "string", "string"],
|
||||
name=["string", "string", "string"],
|
||||
location=["string"],
|
||||
name=["string"],
|
||||
order_by="BANDWIDTH_DOWNLOAD",
|
||||
reverse=True,
|
||||
)
|
||||
|
|
@ -73,17 +69,13 @@ class TestTop:
|
|||
@parametrize
|
||||
def test_method_locations_with_all_params(self, client: Cloudflare) -> None:
|
||||
top = client.radar.quality.speed.top.locations(
|
||||
asn=["string", "string", "string"],
|
||||
continent=["string", "string", "string"],
|
||||
date_end=[
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
],
|
||||
asn=["string"],
|
||||
continent=["string"],
|
||||
date_end=[parse_datetime("2019-12-27T18:11:19.117Z")],
|
||||
format="JSON",
|
||||
limit=5,
|
||||
location=["string", "string", "string"],
|
||||
name=["string", "string", "string"],
|
||||
location=["string"],
|
||||
name=["string"],
|
||||
order_by="BANDWIDTH_DOWNLOAD",
|
||||
reverse=True,
|
||||
)
|
||||
|
|
@ -121,17 +113,13 @@ class TestAsyncTop:
|
|||
@parametrize
|
||||
async def test_method_ases_with_all_params(self, async_client: AsyncCloudflare) -> None:
|
||||
top = await async_client.radar.quality.speed.top.ases(
|
||||
asn=["string", "string", "string"],
|
||||
continent=["string", "string", "string"],
|
||||
date_end=[
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
],
|
||||
asn=["string"],
|
||||
continent=["string"],
|
||||
date_end=[parse_datetime("2019-12-27T18:11:19.117Z")],
|
||||
format="JSON",
|
||||
limit=5,
|
||||
location=["string", "string", "string"],
|
||||
name=["string", "string", "string"],
|
||||
location=["string"],
|
||||
name=["string"],
|
||||
order_by="BANDWIDTH_DOWNLOAD",
|
||||
reverse=True,
|
||||
)
|
||||
|
|
@ -165,17 +153,13 @@ class TestAsyncTop:
|
|||
@parametrize
|
||||
async def test_method_locations_with_all_params(self, async_client: AsyncCloudflare) -> None:
|
||||
top = await async_client.radar.quality.speed.top.locations(
|
||||
asn=["string", "string", "string"],
|
||||
continent=["string", "string", "string"],
|
||||
date_end=[
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
],
|
||||
asn=["string"],
|
||||
continent=["string"],
|
||||
date_end=[parse_datetime("2019-12-27T18:11:19.117Z")],
|
||||
format="JSON",
|
||||
limit=5,
|
||||
location=["string", "string", "string"],
|
||||
name=["string", "string", "string"],
|
||||
location=["string"],
|
||||
name=["string"],
|
||||
order_by="BANDWIDTH_DOWNLOAD",
|
||||
reverse=True,
|
||||
)
|
||||
|
|
|
|||
|
|
@ -32,22 +32,14 @@ class TestIQI:
|
|||
def test_method_summary_with_all_params(self, client: Cloudflare) -> None:
|
||||
iqi = client.radar.quality.iqi.summary(
|
||||
metric="BANDWIDTH",
|
||||
asn=["string", "string", "string"],
|
||||
continent=["string", "string", "string"],
|
||||
date_end=[
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
],
|
||||
date_range=["7d", "7d", "7d"],
|
||||
date_start=[
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
],
|
||||
asn=["string"],
|
||||
continent=["string"],
|
||||
date_end=[parse_datetime("2019-12-27T18:11:19.117Z")],
|
||||
date_range=["7d"],
|
||||
date_start=[parse_datetime("2019-12-27T18:11:19.117Z")],
|
||||
format="JSON",
|
||||
location=["string", "string", "string"],
|
||||
name=["string", "string", "string"],
|
||||
location=["string"],
|
||||
name=["string"],
|
||||
)
|
||||
assert_matches_type(IQISummaryResponse, iqi, path=["response"])
|
||||
|
||||
|
|
@ -87,23 +79,15 @@ class TestIQI:
|
|||
iqi = client.radar.quality.iqi.timeseries_groups(
|
||||
metric="BANDWIDTH",
|
||||
agg_interval="15m",
|
||||
asn=["string", "string", "string"],
|
||||
continent=["string", "string", "string"],
|
||||
date_end=[
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
],
|
||||
date_range=["7d", "7d", "7d"],
|
||||
date_start=[
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
],
|
||||
asn=["string"],
|
||||
continent=["string"],
|
||||
date_end=[parse_datetime("2019-12-27T18:11:19.117Z")],
|
||||
date_range=["7d"],
|
||||
date_start=[parse_datetime("2019-12-27T18:11:19.117Z")],
|
||||
format="JSON",
|
||||
interpolation=True,
|
||||
location=["string", "string", "string"],
|
||||
name=["string", "string", "string"],
|
||||
location=["string"],
|
||||
name=["string"],
|
||||
)
|
||||
assert_matches_type(IQITimeseriesGroupsResponse, iqi, path=["response"])
|
||||
|
||||
|
|
@ -146,22 +130,14 @@ class TestAsyncIQI:
|
|||
async def test_method_summary_with_all_params(self, async_client: AsyncCloudflare) -> None:
|
||||
iqi = await async_client.radar.quality.iqi.summary(
|
||||
metric="BANDWIDTH",
|
||||
asn=["string", "string", "string"],
|
||||
continent=["string", "string", "string"],
|
||||
date_end=[
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
],
|
||||
date_range=["7d", "7d", "7d"],
|
||||
date_start=[
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
],
|
||||
asn=["string"],
|
||||
continent=["string"],
|
||||
date_end=[parse_datetime("2019-12-27T18:11:19.117Z")],
|
||||
date_range=["7d"],
|
||||
date_start=[parse_datetime("2019-12-27T18:11:19.117Z")],
|
||||
format="JSON",
|
||||
location=["string", "string", "string"],
|
||||
name=["string", "string", "string"],
|
||||
location=["string"],
|
||||
name=["string"],
|
||||
)
|
||||
assert_matches_type(IQISummaryResponse, iqi, path=["response"])
|
||||
|
||||
|
|
@ -201,23 +177,15 @@ class TestAsyncIQI:
|
|||
iqi = await async_client.radar.quality.iqi.timeseries_groups(
|
||||
metric="BANDWIDTH",
|
||||
agg_interval="15m",
|
||||
asn=["string", "string", "string"],
|
||||
continent=["string", "string", "string"],
|
||||
date_end=[
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
],
|
||||
date_range=["7d", "7d", "7d"],
|
||||
date_start=[
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
],
|
||||
asn=["string"],
|
||||
continent=["string"],
|
||||
date_end=[parse_datetime("2019-12-27T18:11:19.117Z")],
|
||||
date_range=["7d"],
|
||||
date_start=[parse_datetime("2019-12-27T18:11:19.117Z")],
|
||||
format="JSON",
|
||||
interpolation=True,
|
||||
location=["string", "string", "string"],
|
||||
name=["string", "string", "string"],
|
||||
location=["string"],
|
||||
name=["string"],
|
||||
)
|
||||
assert_matches_type(IQITimeseriesGroupsResponse, iqi, path=["response"])
|
||||
|
||||
|
|
|
|||
|
|
@ -29,18 +29,14 @@ class TestSpeed:
|
|||
@parametrize
|
||||
def test_method_histogram_with_all_params(self, client: Cloudflare) -> None:
|
||||
speed = client.radar.quality.speed.histogram(
|
||||
asn=["string", "string", "string"],
|
||||
asn=["string"],
|
||||
bucket_size=0,
|
||||
continent=["string", "string", "string"],
|
||||
date_end=[
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
],
|
||||
continent=["string"],
|
||||
date_end=[parse_datetime("2019-12-27T18:11:19.117Z")],
|
||||
format="JSON",
|
||||
location=["string", "string", "string"],
|
||||
location=["string"],
|
||||
metric_group="BANDWIDTH",
|
||||
name=["string", "string", "string"],
|
||||
name=["string"],
|
||||
)
|
||||
assert_matches_type(SpeedHistogramResponse, speed, path=["response"])
|
||||
|
||||
|
|
@ -72,16 +68,12 @@ class TestSpeed:
|
|||
@parametrize
|
||||
def test_method_summary_with_all_params(self, client: Cloudflare) -> None:
|
||||
speed = client.radar.quality.speed.summary(
|
||||
asn=["string", "string", "string"],
|
||||
continent=["string", "string", "string"],
|
||||
date_end=[
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
],
|
||||
asn=["string"],
|
||||
continent=["string"],
|
||||
date_end=[parse_datetime("2019-12-27T18:11:19.117Z")],
|
||||
format="JSON",
|
||||
location=["string", "string", "string"],
|
||||
name=["string", "string", "string"],
|
||||
location=["string"],
|
||||
name=["string"],
|
||||
)
|
||||
assert_matches_type(SpeedSummaryResponse, speed, path=["response"])
|
||||
|
||||
|
|
@ -117,18 +109,14 @@ class TestAsyncSpeed:
|
|||
@parametrize
|
||||
async def test_method_histogram_with_all_params(self, async_client: AsyncCloudflare) -> None:
|
||||
speed = await async_client.radar.quality.speed.histogram(
|
||||
asn=["string", "string", "string"],
|
||||
asn=["string"],
|
||||
bucket_size=0,
|
||||
continent=["string", "string", "string"],
|
||||
date_end=[
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
],
|
||||
continent=["string"],
|
||||
date_end=[parse_datetime("2019-12-27T18:11:19.117Z")],
|
||||
format="JSON",
|
||||
location=["string", "string", "string"],
|
||||
location=["string"],
|
||||
metric_group="BANDWIDTH",
|
||||
name=["string", "string", "string"],
|
||||
name=["string"],
|
||||
)
|
||||
assert_matches_type(SpeedHistogramResponse, speed, path=["response"])
|
||||
|
||||
|
|
@ -160,16 +148,12 @@ class TestAsyncSpeed:
|
|||
@parametrize
|
||||
async def test_method_summary_with_all_params(self, async_client: AsyncCloudflare) -> None:
|
||||
speed = await async_client.radar.quality.speed.summary(
|
||||
asn=["string", "string", "string"],
|
||||
continent=["string", "string", "string"],
|
||||
date_end=[
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
],
|
||||
asn=["string"],
|
||||
continent=["string"],
|
||||
date_end=[parse_datetime("2019-12-27T18:11:19.117Z")],
|
||||
format="JSON",
|
||||
location=["string", "string", "string"],
|
||||
name=["string", "string", "string"],
|
||||
location=["string"],
|
||||
name=["string"],
|
||||
)
|
||||
assert_matches_type(SpeedSummaryResponse, speed, path=["response"])
|
||||
|
||||
|
|
|
|||
|
|
@ -28,10 +28,10 @@ class TestDomain:
|
|||
def test_method_get_with_all_params(self, client: Cloudflare) -> None:
|
||||
domain = client.radar.ranking.domain.get(
|
||||
domain="google.com",
|
||||
date=["string", "string", "string"],
|
||||
date=["string"],
|
||||
format="JSON",
|
||||
limit=5,
|
||||
name=["string", "string", "string"],
|
||||
name=["string"],
|
||||
ranking_type="POPULAR",
|
||||
)
|
||||
assert_matches_type(DomainGetResponse, domain, path=["response"])
|
||||
|
|
@ -82,10 +82,10 @@ class TestAsyncDomain:
|
|||
async def test_method_get_with_all_params(self, async_client: AsyncCloudflare) -> None:
|
||||
domain = await async_client.radar.ranking.domain.get(
|
||||
domain="google.com",
|
||||
date=["string", "string", "string"],
|
||||
date=["string"],
|
||||
format="JSON",
|
||||
limit=5,
|
||||
name=["string", "string", "string"],
|
||||
name=["string"],
|
||||
ranking_type="POPULAR",
|
||||
)
|
||||
assert_matches_type(DomainGetResponse, domain, path=["response"])
|
||||
|
|
|
|||
|
|
@ -27,22 +27,14 @@ class TestAS112:
|
|||
def test_method_timeseries_with_all_params(self, client: Cloudflare) -> None:
|
||||
as112 = client.radar.as112.timeseries(
|
||||
agg_interval="15m",
|
||||
asn=["string", "string", "string"],
|
||||
continent=["string", "string", "string"],
|
||||
date_end=[
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
],
|
||||
date_range=["7d", "7d", "7d"],
|
||||
date_start=[
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
],
|
||||
asn=["string"],
|
||||
continent=["string"],
|
||||
date_end=[parse_datetime("2019-12-27T18:11:19.117Z")],
|
||||
date_range=["7d"],
|
||||
date_start=[parse_datetime("2019-12-27T18:11:19.117Z")],
|
||||
format="JSON",
|
||||
location=["string", "string", "string"],
|
||||
name=["string", "string", "string"],
|
||||
location=["string"],
|
||||
name=["string"],
|
||||
)
|
||||
assert_matches_type(AS112TimeseriesResponse, as112, path=["response"])
|
||||
|
||||
|
|
@ -79,22 +71,14 @@ class TestAsyncAS112:
|
|||
async def test_method_timeseries_with_all_params(self, async_client: AsyncCloudflare) -> None:
|
||||
as112 = await async_client.radar.as112.timeseries(
|
||||
agg_interval="15m",
|
||||
asn=["string", "string", "string"],
|
||||
continent=["string", "string", "string"],
|
||||
date_end=[
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
],
|
||||
date_range=["7d", "7d", "7d"],
|
||||
date_start=[
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
],
|
||||
asn=["string"],
|
||||
continent=["string"],
|
||||
date_end=[parse_datetime("2019-12-27T18:11:19.117Z")],
|
||||
date_range=["7d"],
|
||||
date_start=[parse_datetime("2019-12-27T18:11:19.117Z")],
|
||||
format="JSON",
|
||||
location=["string", "string", "string"],
|
||||
name=["string", "string", "string"],
|
||||
location=["string"],
|
||||
name=["string"],
|
||||
)
|
||||
assert_matches_type(AS112TimeseriesResponse, as112, path=["response"])
|
||||
|
||||
|
|
|
|||
|
|
@ -27,22 +27,14 @@ class TestBGP:
|
|||
def test_method_timeseries_with_all_params(self, client: Cloudflare) -> None:
|
||||
bgp = client.radar.bgp.timeseries(
|
||||
agg_interval="15m",
|
||||
asn=["string", "string", "string"],
|
||||
date_end=[
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
],
|
||||
date_range=["7d", "7d", "7d"],
|
||||
date_start=[
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
],
|
||||
asn=["string"],
|
||||
date_end=[parse_datetime("2019-12-27T18:11:19.117Z")],
|
||||
date_range=["7d"],
|
||||
date_start=[parse_datetime("2019-12-27T18:11:19.117Z")],
|
||||
format="JSON",
|
||||
name=["string", "string", "string"],
|
||||
prefix=["1.1.1.0/24", "1.1.1.0/24", "1.1.1.0/24"],
|
||||
update_type=["ANNOUNCEMENT", "WITHDRAWAL"],
|
||||
name=["string"],
|
||||
prefix=["1.1.1.0/24"],
|
||||
update_type=["ANNOUNCEMENT"],
|
||||
)
|
||||
assert_matches_type(BGPTimeseriesResponse, bgp, path=["response"])
|
||||
|
||||
|
|
@ -79,22 +71,14 @@ class TestAsyncBGP:
|
|||
async def test_method_timeseries_with_all_params(self, async_client: AsyncCloudflare) -> None:
|
||||
bgp = await async_client.radar.bgp.timeseries(
|
||||
agg_interval="15m",
|
||||
asn=["string", "string", "string"],
|
||||
date_end=[
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
],
|
||||
date_range=["7d", "7d", "7d"],
|
||||
date_start=[
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
],
|
||||
asn=["string"],
|
||||
date_end=[parse_datetime("2019-12-27T18:11:19.117Z")],
|
||||
date_range=["7d"],
|
||||
date_start=[parse_datetime("2019-12-27T18:11:19.117Z")],
|
||||
format="JSON",
|
||||
name=["string", "string", "string"],
|
||||
prefix=["1.1.1.0/24", "1.1.1.0/24", "1.1.1.0/24"],
|
||||
update_type=["ANNOUNCEMENT", "WITHDRAWAL"],
|
||||
name=["string"],
|
||||
prefix=["1.1.1.0/24"],
|
||||
update_type=["ANNOUNCEMENT"],
|
||||
)
|
||||
assert_matches_type(BGPTimeseriesResponse, bgp, path=["response"])
|
||||
|
||||
|
|
|
|||
|
|
@ -27,22 +27,14 @@ class TestHTTP:
|
|||
def test_method_timeseries_with_all_params(self, client: Cloudflare) -> None:
|
||||
http = client.radar.http.timeseries(
|
||||
agg_interval="15m",
|
||||
asn=["string", "string", "string"],
|
||||
continent=["string", "string", "string"],
|
||||
date_end=[
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
],
|
||||
date_range=["7d", "7d", "7d"],
|
||||
date_start=[
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
],
|
||||
asn=["string"],
|
||||
continent=["string"],
|
||||
date_end=[parse_datetime("2019-12-27T18:11:19.117Z")],
|
||||
date_range=["7d"],
|
||||
date_start=[parse_datetime("2019-12-27T18:11:19.117Z")],
|
||||
format="JSON",
|
||||
location=["string", "string", "string"],
|
||||
name=["string", "string", "string"],
|
||||
location=["string"],
|
||||
name=["string"],
|
||||
normalization="PERCENTAGE_CHANGE",
|
||||
)
|
||||
assert_matches_type(HTTPTimeseriesResponse, http, path=["response"])
|
||||
|
|
@ -80,22 +72,14 @@ class TestAsyncHTTP:
|
|||
async def test_method_timeseries_with_all_params(self, async_client: AsyncCloudflare) -> None:
|
||||
http = await async_client.radar.http.timeseries(
|
||||
agg_interval="15m",
|
||||
asn=["string", "string", "string"],
|
||||
continent=["string", "string", "string"],
|
||||
date_end=[
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
],
|
||||
date_range=["7d", "7d", "7d"],
|
||||
date_start=[
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
],
|
||||
asn=["string"],
|
||||
continent=["string"],
|
||||
date_end=[parse_datetime("2019-12-27T18:11:19.117Z")],
|
||||
date_range=["7d"],
|
||||
date_start=[parse_datetime("2019-12-27T18:11:19.117Z")],
|
||||
format="JSON",
|
||||
location=["string", "string", "string"],
|
||||
name=["string", "string", "string"],
|
||||
location=["string"],
|
||||
name=["string"],
|
||||
normalization="PERCENTAGE_CHANGE",
|
||||
)
|
||||
assert_matches_type(HTTPTimeseriesResponse, http, path=["response"])
|
||||
|
|
|
|||
|
|
@ -29,22 +29,14 @@ class TestNetflows:
|
|||
@parametrize
|
||||
def test_method_summary_with_all_params(self, client: Cloudflare) -> None:
|
||||
netflow = client.radar.netflows.summary(
|
||||
asn=["string", "string", "string"],
|
||||
continent=["string", "string", "string"],
|
||||
date_end=[
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
],
|
||||
date_range=["7d", "7d", "7d"],
|
||||
date_start=[
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
],
|
||||
asn=["string"],
|
||||
continent=["string"],
|
||||
date_end=[parse_datetime("2019-12-27T18:11:19.117Z")],
|
||||
date_range=["7d"],
|
||||
date_start=[parse_datetime("2019-12-27T18:11:19.117Z")],
|
||||
format="JSON",
|
||||
location=["string", "string", "string"],
|
||||
name=["string", "string", "string"],
|
||||
location=["string"],
|
||||
name=["string"],
|
||||
)
|
||||
assert_matches_type(NetflowSummaryResponse, netflow, path=["response"])
|
||||
|
||||
|
|
@ -77,24 +69,16 @@ class TestNetflows:
|
|||
def test_method_timeseries_with_all_params(self, client: Cloudflare) -> None:
|
||||
netflow = client.radar.netflows.timeseries(
|
||||
agg_interval="15m",
|
||||
asn=["string", "string", "string"],
|
||||
continent=["string", "string", "string"],
|
||||
date_end=[
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
],
|
||||
date_range=["7d", "7d", "7d"],
|
||||
date_start=[
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
],
|
||||
asn=["string"],
|
||||
continent=["string"],
|
||||
date_end=[parse_datetime("2019-12-27T18:11:19.117Z")],
|
||||
date_range=["7d"],
|
||||
date_start=[parse_datetime("2019-12-27T18:11:19.117Z")],
|
||||
format="JSON",
|
||||
location=["string", "string", "string"],
|
||||
name=["string", "string", "string"],
|
||||
location=["string"],
|
||||
name=["string"],
|
||||
normalization="PERCENTAGE_CHANGE",
|
||||
product=["HTTP", "ALL"],
|
||||
product=["HTTP"],
|
||||
)
|
||||
assert_matches_type(NetflowTimeseriesResponse, netflow, path=["response"])
|
||||
|
||||
|
|
@ -130,22 +114,14 @@ class TestAsyncNetflows:
|
|||
@parametrize
|
||||
async def test_method_summary_with_all_params(self, async_client: AsyncCloudflare) -> None:
|
||||
netflow = await async_client.radar.netflows.summary(
|
||||
asn=["string", "string", "string"],
|
||||
continent=["string", "string", "string"],
|
||||
date_end=[
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
],
|
||||
date_range=["7d", "7d", "7d"],
|
||||
date_start=[
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
],
|
||||
asn=["string"],
|
||||
continent=["string"],
|
||||
date_end=[parse_datetime("2019-12-27T18:11:19.117Z")],
|
||||
date_range=["7d"],
|
||||
date_start=[parse_datetime("2019-12-27T18:11:19.117Z")],
|
||||
format="JSON",
|
||||
location=["string", "string", "string"],
|
||||
name=["string", "string", "string"],
|
||||
location=["string"],
|
||||
name=["string"],
|
||||
)
|
||||
assert_matches_type(NetflowSummaryResponse, netflow, path=["response"])
|
||||
|
||||
|
|
@ -178,24 +154,16 @@ class TestAsyncNetflows:
|
|||
async def test_method_timeseries_with_all_params(self, async_client: AsyncCloudflare) -> None:
|
||||
netflow = await async_client.radar.netflows.timeseries(
|
||||
agg_interval="15m",
|
||||
asn=["string", "string", "string"],
|
||||
continent=["string", "string", "string"],
|
||||
date_end=[
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
],
|
||||
date_range=["7d", "7d", "7d"],
|
||||
date_start=[
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
],
|
||||
asn=["string"],
|
||||
continent=["string"],
|
||||
date_end=[parse_datetime("2019-12-27T18:11:19.117Z")],
|
||||
date_range=["7d"],
|
||||
date_start=[parse_datetime("2019-12-27T18:11:19.117Z")],
|
||||
format="JSON",
|
||||
location=["string", "string", "string"],
|
||||
name=["string", "string", "string"],
|
||||
location=["string"],
|
||||
name=["string"],
|
||||
normalization="PERCENTAGE_CHANGE",
|
||||
product=["HTTP", "ALL"],
|
||||
product=["HTTP"],
|
||||
)
|
||||
assert_matches_type(NetflowTimeseriesResponse, netflow, path=["response"])
|
||||
|
||||
|
|
|
|||
|
|
@ -29,22 +29,14 @@ class TestRanking:
|
|||
@parametrize
|
||||
def test_method_timeseries_groups_with_all_params(self, client: Cloudflare) -> None:
|
||||
ranking = client.radar.ranking.timeseries_groups(
|
||||
date_end=[
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
],
|
||||
date_range=["7d", "7d", "7d"],
|
||||
date_start=[
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
],
|
||||
domains=["string", "string", "string"],
|
||||
date_end=[parse_datetime("2019-12-27T18:11:19.117Z")],
|
||||
date_range=["7d"],
|
||||
date_start=[parse_datetime("2019-12-27T18:11:19.117Z")],
|
||||
domains=["string"],
|
||||
format="JSON",
|
||||
limit=5,
|
||||
location=["string", "string", "string"],
|
||||
name=["string", "string", "string"],
|
||||
location=["string"],
|
||||
name=["string"],
|
||||
ranking_type="POPULAR",
|
||||
)
|
||||
assert_matches_type(RankingTimeseriesGroupsResponse, ranking, path=["response"])
|
||||
|
|
@ -77,11 +69,11 @@ class TestRanking:
|
|||
@parametrize
|
||||
def test_method_top_with_all_params(self, client: Cloudflare) -> None:
|
||||
ranking = client.radar.ranking.top(
|
||||
date=["string", "string", "string"],
|
||||
date=["string"],
|
||||
format="JSON",
|
||||
limit=5,
|
||||
location=["string", "string", "string"],
|
||||
name=["string", "string", "string"],
|
||||
location=["string"],
|
||||
name=["string"],
|
||||
ranking_type="POPULAR",
|
||||
)
|
||||
assert_matches_type(RankingTopResponse, ranking, path=["response"])
|
||||
|
|
@ -118,22 +110,14 @@ class TestAsyncRanking:
|
|||
@parametrize
|
||||
async def test_method_timeseries_groups_with_all_params(self, async_client: AsyncCloudflare) -> None:
|
||||
ranking = await async_client.radar.ranking.timeseries_groups(
|
||||
date_end=[
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
],
|
||||
date_range=["7d", "7d", "7d"],
|
||||
date_start=[
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
],
|
||||
domains=["string", "string", "string"],
|
||||
date_end=[parse_datetime("2019-12-27T18:11:19.117Z")],
|
||||
date_range=["7d"],
|
||||
date_start=[parse_datetime("2019-12-27T18:11:19.117Z")],
|
||||
domains=["string"],
|
||||
format="JSON",
|
||||
limit=5,
|
||||
location=["string", "string", "string"],
|
||||
name=["string", "string", "string"],
|
||||
location=["string"],
|
||||
name=["string"],
|
||||
ranking_type="POPULAR",
|
||||
)
|
||||
assert_matches_type(RankingTimeseriesGroupsResponse, ranking, path=["response"])
|
||||
|
|
@ -166,11 +150,11 @@ class TestAsyncRanking:
|
|||
@parametrize
|
||||
async def test_method_top_with_all_params(self, async_client: AsyncCloudflare) -> None:
|
||||
ranking = await async_client.radar.ranking.top(
|
||||
date=["string", "string", "string"],
|
||||
date=["string"],
|
||||
format="JSON",
|
||||
limit=5,
|
||||
location=["string", "string", "string"],
|
||||
name=["string", "string", "string"],
|
||||
location=["string"],
|
||||
name=["string"],
|
||||
ranking_type="POPULAR",
|
||||
)
|
||||
assert_matches_type(RankingTopResponse, ranking, path=["response"])
|
||||
|
|
|
|||
|
|
@ -28,9 +28,9 @@ class TestSearch:
|
|||
def test_method_global_with_all_params(self, client: Cloudflare) -> None:
|
||||
search = client.radar.search.global_(
|
||||
query="United",
|
||||
exclude=["SPECIAL_EVENTS", "NOTEBOOKS", "LOCATIONS"],
|
||||
exclude=["SPECIAL_EVENTS"],
|
||||
format="JSON",
|
||||
include=["SPECIAL_EVENTS", "NOTEBOOKS", "LOCATIONS"],
|
||||
include=["SPECIAL_EVENTS"],
|
||||
limit=5,
|
||||
limit_per_group=0,
|
||||
)
|
||||
|
|
@ -75,9 +75,9 @@ class TestAsyncSearch:
|
|||
async def test_method_global_with_all_params(self, async_client: AsyncCloudflare) -> None:
|
||||
search = await async_client.radar.search.global_(
|
||||
query="United",
|
||||
exclude=["SPECIAL_EVENTS", "NOTEBOOKS", "LOCATIONS"],
|
||||
exclude=["SPECIAL_EVENTS"],
|
||||
format="JSON",
|
||||
include=["SPECIAL_EVENTS", "NOTEBOOKS", "LOCATIONS"],
|
||||
include=["SPECIAL_EVENTS"],
|
||||
limit=5,
|
||||
limit_per_group=0,
|
||||
)
|
||||
|
|
|
|||
|
|
@ -29,22 +29,14 @@ class TestTCPResetsTimeouts:
|
|||
@parametrize
|
||||
def test_method_summary_with_all_params(self, client: Cloudflare) -> None:
|
||||
tcp_resets_timeout = client.radar.tcp_resets_timeouts.summary(
|
||||
asn=["string", "string", "string"],
|
||||
continent=["string", "string", "string"],
|
||||
date_end=[
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
],
|
||||
date_range=["7d", "7d", "7d"],
|
||||
date_start=[
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
],
|
||||
asn=["string"],
|
||||
continent=["string"],
|
||||
date_end=[parse_datetime("2019-12-27T18:11:19.117Z")],
|
||||
date_range=["7d"],
|
||||
date_start=[parse_datetime("2019-12-27T18:11:19.117Z")],
|
||||
format="JSON",
|
||||
location=["string", "string", "string"],
|
||||
name=["string", "string", "string"],
|
||||
location=["string"],
|
||||
name=["string"],
|
||||
)
|
||||
assert_matches_type(TCPResetsTimeoutSummaryResponse, tcp_resets_timeout, path=["response"])
|
||||
|
||||
|
|
@ -77,22 +69,14 @@ class TestTCPResetsTimeouts:
|
|||
def test_method_timeseries_groups_with_all_params(self, client: Cloudflare) -> None:
|
||||
tcp_resets_timeout = client.radar.tcp_resets_timeouts.timeseries_groups(
|
||||
agg_interval="15m",
|
||||
asn=["string", "string", "string"],
|
||||
continent=["string", "string", "string"],
|
||||
date_end=[
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
],
|
||||
date_range=["7d", "7d", "7d"],
|
||||
date_start=[
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
],
|
||||
asn=["string"],
|
||||
continent=["string"],
|
||||
date_end=[parse_datetime("2019-12-27T18:11:19.117Z")],
|
||||
date_range=["7d"],
|
||||
date_start=[parse_datetime("2019-12-27T18:11:19.117Z")],
|
||||
format="JSON",
|
||||
location=["string", "string", "string"],
|
||||
name=["string", "string", "string"],
|
||||
location=["string"],
|
||||
name=["string"],
|
||||
)
|
||||
assert_matches_type(TCPResetsTimeoutTimeseriesGroupsResponse, tcp_resets_timeout, path=["response"])
|
||||
|
||||
|
|
@ -128,22 +112,14 @@ class TestAsyncTCPResetsTimeouts:
|
|||
@parametrize
|
||||
async def test_method_summary_with_all_params(self, async_client: AsyncCloudflare) -> None:
|
||||
tcp_resets_timeout = await async_client.radar.tcp_resets_timeouts.summary(
|
||||
asn=["string", "string", "string"],
|
||||
continent=["string", "string", "string"],
|
||||
date_end=[
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
],
|
||||
date_range=["7d", "7d", "7d"],
|
||||
date_start=[
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
],
|
||||
asn=["string"],
|
||||
continent=["string"],
|
||||
date_end=[parse_datetime("2019-12-27T18:11:19.117Z")],
|
||||
date_range=["7d"],
|
||||
date_start=[parse_datetime("2019-12-27T18:11:19.117Z")],
|
||||
format="JSON",
|
||||
location=["string", "string", "string"],
|
||||
name=["string", "string", "string"],
|
||||
location=["string"],
|
||||
name=["string"],
|
||||
)
|
||||
assert_matches_type(TCPResetsTimeoutSummaryResponse, tcp_resets_timeout, path=["response"])
|
||||
|
||||
|
|
@ -176,22 +152,14 @@ class TestAsyncTCPResetsTimeouts:
|
|||
async def test_method_timeseries_groups_with_all_params(self, async_client: AsyncCloudflare) -> None:
|
||||
tcp_resets_timeout = await async_client.radar.tcp_resets_timeouts.timeseries_groups(
|
||||
agg_interval="15m",
|
||||
asn=["string", "string", "string"],
|
||||
continent=["string", "string", "string"],
|
||||
date_end=[
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
],
|
||||
date_range=["7d", "7d", "7d"],
|
||||
date_start=[
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
],
|
||||
asn=["string"],
|
||||
continent=["string"],
|
||||
date_end=[parse_datetime("2019-12-27T18:11:19.117Z")],
|
||||
date_range=["7d"],
|
||||
date_start=[parse_datetime("2019-12-27T18:11:19.117Z")],
|
||||
format="JSON",
|
||||
location=["string", "string", "string"],
|
||||
name=["string", "string", "string"],
|
||||
location=["string"],
|
||||
name=["string"],
|
||||
)
|
||||
assert_matches_type(TCPResetsTimeoutTimeseriesGroupsResponse, tcp_resets_timeout, path=["response"])
|
||||
|
||||
|
|
|
|||
|
|
@ -29,23 +29,15 @@ class TestTop:
|
|||
@parametrize
|
||||
def test_method_bots_with_all_params(self, client: Cloudflare) -> None:
|
||||
top = client.radar.verified_bots.top.bots(
|
||||
asn=["string", "string", "string"],
|
||||
continent=["string", "string", "string"],
|
||||
date_end=[
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
],
|
||||
date_range=["7d", "7d", "7d"],
|
||||
date_start=[
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
],
|
||||
asn=["string"],
|
||||
continent=["string"],
|
||||
date_end=[parse_datetime("2019-12-27T18:11:19.117Z")],
|
||||
date_range=["7d"],
|
||||
date_start=[parse_datetime("2019-12-27T18:11:19.117Z")],
|
||||
format="JSON",
|
||||
limit=5,
|
||||
location=["string", "string", "string"],
|
||||
name=["string", "string", "string"],
|
||||
location=["string"],
|
||||
name=["string"],
|
||||
)
|
||||
assert_matches_type(TopBotsResponse, top, path=["response"])
|
||||
|
||||
|
|
@ -77,23 +69,15 @@ class TestTop:
|
|||
@parametrize
|
||||
def test_method_categories_with_all_params(self, client: Cloudflare) -> None:
|
||||
top = client.radar.verified_bots.top.categories(
|
||||
asn=["string", "string", "string"],
|
||||
continent=["string", "string", "string"],
|
||||
date_end=[
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
],
|
||||
date_range=["7d", "7d", "7d"],
|
||||
date_start=[
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
],
|
||||
asn=["string"],
|
||||
continent=["string"],
|
||||
date_end=[parse_datetime("2019-12-27T18:11:19.117Z")],
|
||||
date_range=["7d"],
|
||||
date_start=[parse_datetime("2019-12-27T18:11:19.117Z")],
|
||||
format="JSON",
|
||||
limit=5,
|
||||
location=["string", "string", "string"],
|
||||
name=["string", "string", "string"],
|
||||
location=["string"],
|
||||
name=["string"],
|
||||
)
|
||||
assert_matches_type(TopCategoriesResponse, top, path=["response"])
|
||||
|
||||
|
|
@ -129,23 +113,15 @@ class TestAsyncTop:
|
|||
@parametrize
|
||||
async def test_method_bots_with_all_params(self, async_client: AsyncCloudflare) -> None:
|
||||
top = await async_client.radar.verified_bots.top.bots(
|
||||
asn=["string", "string", "string"],
|
||||
continent=["string", "string", "string"],
|
||||
date_end=[
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
],
|
||||
date_range=["7d", "7d", "7d"],
|
||||
date_start=[
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
],
|
||||
asn=["string"],
|
||||
continent=["string"],
|
||||
date_end=[parse_datetime("2019-12-27T18:11:19.117Z")],
|
||||
date_range=["7d"],
|
||||
date_start=[parse_datetime("2019-12-27T18:11:19.117Z")],
|
||||
format="JSON",
|
||||
limit=5,
|
||||
location=["string", "string", "string"],
|
||||
name=["string", "string", "string"],
|
||||
location=["string"],
|
||||
name=["string"],
|
||||
)
|
||||
assert_matches_type(TopBotsResponse, top, path=["response"])
|
||||
|
||||
|
|
@ -177,23 +153,15 @@ class TestAsyncTop:
|
|||
@parametrize
|
||||
async def test_method_categories_with_all_params(self, async_client: AsyncCloudflare) -> None:
|
||||
top = await async_client.radar.verified_bots.top.categories(
|
||||
asn=["string", "string", "string"],
|
||||
continent=["string", "string", "string"],
|
||||
date_end=[
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
],
|
||||
date_range=["7d", "7d", "7d"],
|
||||
date_start=[
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
parse_datetime("2019-12-27T18:11:19.117Z"),
|
||||
],
|
||||
asn=["string"],
|
||||
continent=["string"],
|
||||
date_end=[parse_datetime("2019-12-27T18:11:19.117Z")],
|
||||
date_range=["7d"],
|
||||
date_start=[parse_datetime("2019-12-27T18:11:19.117Z")],
|
||||
format="JSON",
|
||||
limit=5,
|
||||
location=["string", "string", "string"],
|
||||
name=["string", "string", "string"],
|
||||
location=["string"],
|
||||
name=["string"],
|
||||
)
|
||||
assert_matches_type(TopCategoriesResponse, top, path=["response"])
|
||||
|
||||
|
|
|
|||
|
|
@ -29,7 +29,7 @@ class TestItems:
|
|||
item = client.rules.lists.items.create(
|
||||
list_id="2c0fc9fa937b11eaa1b71c4d701ab86e",
|
||||
account_id="023e105f4ecef8ad9ca31a8372d0c353",
|
||||
body=[{}, {}, {}],
|
||||
body=[{}],
|
||||
)
|
||||
assert_matches_type(ItemCreateResponse, item, path=["response"])
|
||||
|
||||
|
|
@ -38,7 +38,7 @@ class TestItems:
|
|||
response = client.rules.lists.items.with_raw_response.create(
|
||||
list_id="2c0fc9fa937b11eaa1b71c4d701ab86e",
|
||||
account_id="023e105f4ecef8ad9ca31a8372d0c353",
|
||||
body=[{}, {}, {}],
|
||||
body=[{}],
|
||||
)
|
||||
|
||||
assert response.is_closed is True
|
||||
|
|
@ -51,7 +51,7 @@ class TestItems:
|
|||
with client.rules.lists.items.with_streaming_response.create(
|
||||
list_id="2c0fc9fa937b11eaa1b71c4d701ab86e",
|
||||
account_id="023e105f4ecef8ad9ca31a8372d0c353",
|
||||
body=[{}, {}, {}],
|
||||
body=[{}],
|
||||
) as response:
|
||||
assert not response.is_closed
|
||||
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
|
||||
|
|
@ -67,14 +67,14 @@ class TestItems:
|
|||
client.rules.lists.items.with_raw_response.create(
|
||||
list_id="2c0fc9fa937b11eaa1b71c4d701ab86e",
|
||||
account_id="",
|
||||
body=[{}, {}, {}],
|
||||
body=[{}],
|
||||
)
|
||||
|
||||
with pytest.raises(ValueError, match=r"Expected a non-empty value for `list_id` but received ''"):
|
||||
client.rules.lists.items.with_raw_response.create(
|
||||
list_id="",
|
||||
account_id="023e105f4ecef8ad9ca31a8372d0c353",
|
||||
body=[{}, {}, {}],
|
||||
body=[{}],
|
||||
)
|
||||
|
||||
@parametrize
|
||||
|
|
@ -82,7 +82,7 @@ class TestItems:
|
|||
item = client.rules.lists.items.update(
|
||||
list_id="2c0fc9fa937b11eaa1b71c4d701ab86e",
|
||||
account_id="023e105f4ecef8ad9ca31a8372d0c353",
|
||||
body=[{}, {}, {}],
|
||||
body=[{}],
|
||||
)
|
||||
assert_matches_type(ItemUpdateResponse, item, path=["response"])
|
||||
|
||||
|
|
@ -91,7 +91,7 @@ class TestItems:
|
|||
response = client.rules.lists.items.with_raw_response.update(
|
||||
list_id="2c0fc9fa937b11eaa1b71c4d701ab86e",
|
||||
account_id="023e105f4ecef8ad9ca31a8372d0c353",
|
||||
body=[{}, {}, {}],
|
||||
body=[{}],
|
||||
)
|
||||
|
||||
assert response.is_closed is True
|
||||
|
|
@ -104,7 +104,7 @@ class TestItems:
|
|||
with client.rules.lists.items.with_streaming_response.update(
|
||||
list_id="2c0fc9fa937b11eaa1b71c4d701ab86e",
|
||||
account_id="023e105f4ecef8ad9ca31a8372d0c353",
|
||||
body=[{}, {}, {}],
|
||||
body=[{}],
|
||||
) as response:
|
||||
assert not response.is_closed
|
||||
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
|
||||
|
|
@ -120,14 +120,14 @@ class TestItems:
|
|||
client.rules.lists.items.with_raw_response.update(
|
||||
list_id="2c0fc9fa937b11eaa1b71c4d701ab86e",
|
||||
account_id="",
|
||||
body=[{}, {}, {}],
|
||||
body=[{}],
|
||||
)
|
||||
|
||||
with pytest.raises(ValueError, match=r"Expected a non-empty value for `list_id` but received ''"):
|
||||
client.rules.lists.items.with_raw_response.update(
|
||||
list_id="",
|
||||
account_id="023e105f4ecef8ad9ca31a8372d0c353",
|
||||
body=[{}, {}, {}],
|
||||
body=[{}],
|
||||
)
|
||||
|
||||
@parametrize
|
||||
|
|
@ -306,7 +306,7 @@ class TestAsyncItems:
|
|||
item = await async_client.rules.lists.items.create(
|
||||
list_id="2c0fc9fa937b11eaa1b71c4d701ab86e",
|
||||
account_id="023e105f4ecef8ad9ca31a8372d0c353",
|
||||
body=[{}, {}, {}],
|
||||
body=[{}],
|
||||
)
|
||||
assert_matches_type(ItemCreateResponse, item, path=["response"])
|
||||
|
||||
|
|
@ -315,7 +315,7 @@ class TestAsyncItems:
|
|||
response = await async_client.rules.lists.items.with_raw_response.create(
|
||||
list_id="2c0fc9fa937b11eaa1b71c4d701ab86e",
|
||||
account_id="023e105f4ecef8ad9ca31a8372d0c353",
|
||||
body=[{}, {}, {}],
|
||||
body=[{}],
|
||||
)
|
||||
|
||||
assert response.is_closed is True
|
||||
|
|
@ -328,7 +328,7 @@ class TestAsyncItems:
|
|||
async with async_client.rules.lists.items.with_streaming_response.create(
|
||||
list_id="2c0fc9fa937b11eaa1b71c4d701ab86e",
|
||||
account_id="023e105f4ecef8ad9ca31a8372d0c353",
|
||||
body=[{}, {}, {}],
|
||||
body=[{}],
|
||||
) as response:
|
||||
assert not response.is_closed
|
||||
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
|
||||
|
|
@ -344,14 +344,14 @@ class TestAsyncItems:
|
|||
await async_client.rules.lists.items.with_raw_response.create(
|
||||
list_id="2c0fc9fa937b11eaa1b71c4d701ab86e",
|
||||
account_id="",
|
||||
body=[{}, {}, {}],
|
||||
body=[{}],
|
||||
)
|
||||
|
||||
with pytest.raises(ValueError, match=r"Expected a non-empty value for `list_id` but received ''"):
|
||||
await async_client.rules.lists.items.with_raw_response.create(
|
||||
list_id="",
|
||||
account_id="023e105f4ecef8ad9ca31a8372d0c353",
|
||||
body=[{}, {}, {}],
|
||||
body=[{}],
|
||||
)
|
||||
|
||||
@parametrize
|
||||
|
|
@ -359,7 +359,7 @@ class TestAsyncItems:
|
|||
item = await async_client.rules.lists.items.update(
|
||||
list_id="2c0fc9fa937b11eaa1b71c4d701ab86e",
|
||||
account_id="023e105f4ecef8ad9ca31a8372d0c353",
|
||||
body=[{}, {}, {}],
|
||||
body=[{}],
|
||||
)
|
||||
assert_matches_type(ItemUpdateResponse, item, path=["response"])
|
||||
|
||||
|
|
@ -368,7 +368,7 @@ class TestAsyncItems:
|
|||
response = await async_client.rules.lists.items.with_raw_response.update(
|
||||
list_id="2c0fc9fa937b11eaa1b71c4d701ab86e",
|
||||
account_id="023e105f4ecef8ad9ca31a8372d0c353",
|
||||
body=[{}, {}, {}],
|
||||
body=[{}],
|
||||
)
|
||||
|
||||
assert response.is_closed is True
|
||||
|
|
@ -381,7 +381,7 @@ class TestAsyncItems:
|
|||
async with async_client.rules.lists.items.with_streaming_response.update(
|
||||
list_id="2c0fc9fa937b11eaa1b71c4d701ab86e",
|
||||
account_id="023e105f4ecef8ad9ca31a8372d0c353",
|
||||
body=[{}, {}, {}],
|
||||
body=[{}],
|
||||
) as response:
|
||||
assert not response.is_closed
|
||||
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
|
||||
|
|
@ -397,14 +397,14 @@ class TestAsyncItems:
|
|||
await async_client.rules.lists.items.with_raw_response.update(
|
||||
list_id="2c0fc9fa937b11eaa1b71c4d701ab86e",
|
||||
account_id="",
|
||||
body=[{}, {}, {}],
|
||||
body=[{}],
|
||||
)
|
||||
|
||||
with pytest.raises(ValueError, match=r"Expected a non-empty value for `list_id` but received ''"):
|
||||
await async_client.rules.lists.items.with_raw_response.update(
|
||||
list_id="",
|
||||
account_id="023e105f4ecef8ad9ca31a8372d0c353",
|
||||
body=[{}, {}, {}],
|
||||
body=[{}],
|
||||
)
|
||||
|
||||
@parametrize
|
||||
|
|
|
|||
|
|
@ -22,7 +22,7 @@ class TestPhases:
|
|||
def test_method_update(self, client: Cloudflare) -> None:
|
||||
phase = client.rulesets.phases.update(
|
||||
ruleset_phase="ddos_l4",
|
||||
rules=[{}, {}, {}],
|
||||
rules=[{}],
|
||||
account_id="account_id",
|
||||
)
|
||||
assert_matches_type(PhaseUpdateResponse, phase, path=["response"])
|
||||
|
|
@ -62,67 +62,7 @@ class TestPhases:
|
|||
"score_response_header_name": "my-score",
|
||||
},
|
||||
"ref": "my_ref",
|
||||
},
|
||||
{
|
||||
"id": "3a03d665bac047339bb530ecb439a90d",
|
||||
"action": "block",
|
||||
"action_parameters": {
|
||||
"response": {
|
||||
"content": '{\n "success": false,\n "error": "you have been blocked"\n}',
|
||||
"content_type": "application/json",
|
||||
"status_code": 400,
|
||||
}
|
||||
},
|
||||
"description": "Block when the IP address is not 1.1.1.1",
|
||||
"enabled": True,
|
||||
"exposed_credential_check": {
|
||||
"password_expression": 'url_decode(http.request.body.form[\\"password\\"][0])',
|
||||
"username_expression": 'url_decode(http.request.body.form[\\"username\\"][0])',
|
||||
},
|
||||
"expression": "ip.src ne 1.1.1.1",
|
||||
"logging": {"enabled": True},
|
||||
"ratelimit": {
|
||||
"characteristics": ["ip.src"],
|
||||
"period": 10,
|
||||
"counting_expression": 'http.request.body.raw eq "abcd"',
|
||||
"mitigation_timeout": 600,
|
||||
"requests_per_period": 1000,
|
||||
"requests_to_origin": True,
|
||||
"score_per_period": 400,
|
||||
"score_response_header_name": "my-score",
|
||||
},
|
||||
"ref": "my_ref",
|
||||
},
|
||||
{
|
||||
"id": "3a03d665bac047339bb530ecb439a90d",
|
||||
"action": "block",
|
||||
"action_parameters": {
|
||||
"response": {
|
||||
"content": '{\n "success": false,\n "error": "you have been blocked"\n}',
|
||||
"content_type": "application/json",
|
||||
"status_code": 400,
|
||||
}
|
||||
},
|
||||
"description": "Block when the IP address is not 1.1.1.1",
|
||||
"enabled": True,
|
||||
"exposed_credential_check": {
|
||||
"password_expression": 'url_decode(http.request.body.form[\\"password\\"][0])',
|
||||
"username_expression": 'url_decode(http.request.body.form[\\"username\\"][0])',
|
||||
},
|
||||
"expression": "ip.src ne 1.1.1.1",
|
||||
"logging": {"enabled": True},
|
||||
"ratelimit": {
|
||||
"characteristics": ["ip.src"],
|
||||
"period": 10,
|
||||
"counting_expression": 'http.request.body.raw eq "abcd"',
|
||||
"mitigation_timeout": 600,
|
||||
"requests_per_period": 1000,
|
||||
"requests_to_origin": True,
|
||||
"score_per_period": 400,
|
||||
"score_response_header_name": "my-score",
|
||||
},
|
||||
"ref": "my_ref",
|
||||
},
|
||||
}
|
||||
],
|
||||
account_id="account_id",
|
||||
description="My ruleset to execute managed rulesets",
|
||||
|
|
@ -135,7 +75,7 @@ class TestPhases:
|
|||
def test_raw_response_update(self, client: Cloudflare) -> None:
|
||||
response = client.rulesets.phases.with_raw_response.update(
|
||||
ruleset_phase="ddos_l4",
|
||||
rules=[{}, {}, {}],
|
||||
rules=[{}],
|
||||
account_id="account_id",
|
||||
)
|
||||
|
||||
|
|
@ -149,7 +89,7 @@ class TestPhases:
|
|||
def test_streaming_response_update(self, client: Cloudflare) -> None:
|
||||
with client.rulesets.phases.with_streaming_response.update(
|
||||
ruleset_phase="ddos_l4",
|
||||
rules=[{}, {}, {}],
|
||||
rules=[{}],
|
||||
account_id="account_id",
|
||||
) as response:
|
||||
assert not response.is_closed
|
||||
|
|
@ -166,14 +106,14 @@ class TestPhases:
|
|||
with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"):
|
||||
client.rulesets.phases.with_raw_response.update(
|
||||
ruleset_phase="ddos_l4",
|
||||
rules=[{}, {}, {}],
|
||||
rules=[{}],
|
||||
account_id="",
|
||||
)
|
||||
|
||||
with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"):
|
||||
client.rulesets.phases.with_raw_response.update(
|
||||
ruleset_phase="ddos_l4",
|
||||
rules=[{}, {}, {}],
|
||||
rules=[{}],
|
||||
account_id="account_id",
|
||||
)
|
||||
|
||||
|
|
@ -247,7 +187,7 @@ class TestAsyncPhases:
|
|||
async def test_method_update(self, async_client: AsyncCloudflare) -> None:
|
||||
phase = await async_client.rulesets.phases.update(
|
||||
ruleset_phase="ddos_l4",
|
||||
rules=[{}, {}, {}],
|
||||
rules=[{}],
|
||||
account_id="account_id",
|
||||
)
|
||||
assert_matches_type(PhaseUpdateResponse, phase, path=["response"])
|
||||
|
|
@ -287,67 +227,7 @@ class TestAsyncPhases:
|
|||
"score_response_header_name": "my-score",
|
||||
},
|
||||
"ref": "my_ref",
|
||||
},
|
||||
{
|
||||
"id": "3a03d665bac047339bb530ecb439a90d",
|
||||
"action": "block",
|
||||
"action_parameters": {
|
||||
"response": {
|
||||
"content": '{\n "success": false,\n "error": "you have been blocked"\n}',
|
||||
"content_type": "application/json",
|
||||
"status_code": 400,
|
||||
}
|
||||
},
|
||||
"description": "Block when the IP address is not 1.1.1.1",
|
||||
"enabled": True,
|
||||
"exposed_credential_check": {
|
||||
"password_expression": 'url_decode(http.request.body.form[\\"password\\"][0])',
|
||||
"username_expression": 'url_decode(http.request.body.form[\\"username\\"][0])',
|
||||
},
|
||||
"expression": "ip.src ne 1.1.1.1",
|
||||
"logging": {"enabled": True},
|
||||
"ratelimit": {
|
||||
"characteristics": ["ip.src"],
|
||||
"period": 10,
|
||||
"counting_expression": 'http.request.body.raw eq "abcd"',
|
||||
"mitigation_timeout": 600,
|
||||
"requests_per_period": 1000,
|
||||
"requests_to_origin": True,
|
||||
"score_per_period": 400,
|
||||
"score_response_header_name": "my-score",
|
||||
},
|
||||
"ref": "my_ref",
|
||||
},
|
||||
{
|
||||
"id": "3a03d665bac047339bb530ecb439a90d",
|
||||
"action": "block",
|
||||
"action_parameters": {
|
||||
"response": {
|
||||
"content": '{\n "success": false,\n "error": "you have been blocked"\n}',
|
||||
"content_type": "application/json",
|
||||
"status_code": 400,
|
||||
}
|
||||
},
|
||||
"description": "Block when the IP address is not 1.1.1.1",
|
||||
"enabled": True,
|
||||
"exposed_credential_check": {
|
||||
"password_expression": 'url_decode(http.request.body.form[\\"password\\"][0])',
|
||||
"username_expression": 'url_decode(http.request.body.form[\\"username\\"][0])',
|
||||
},
|
||||
"expression": "ip.src ne 1.1.1.1",
|
||||
"logging": {"enabled": True},
|
||||
"ratelimit": {
|
||||
"characteristics": ["ip.src"],
|
||||
"period": 10,
|
||||
"counting_expression": 'http.request.body.raw eq "abcd"',
|
||||
"mitigation_timeout": 600,
|
||||
"requests_per_period": 1000,
|
||||
"requests_to_origin": True,
|
||||
"score_per_period": 400,
|
||||
"score_response_header_name": "my-score",
|
||||
},
|
||||
"ref": "my_ref",
|
||||
},
|
||||
}
|
||||
],
|
||||
account_id="account_id",
|
||||
description="My ruleset to execute managed rulesets",
|
||||
|
|
@ -360,7 +240,7 @@ class TestAsyncPhases:
|
|||
async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None:
|
||||
response = await async_client.rulesets.phases.with_raw_response.update(
|
||||
ruleset_phase="ddos_l4",
|
||||
rules=[{}, {}, {}],
|
||||
rules=[{}],
|
||||
account_id="account_id",
|
||||
)
|
||||
|
||||
|
|
@ -374,7 +254,7 @@ class TestAsyncPhases:
|
|||
async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> None:
|
||||
async with async_client.rulesets.phases.with_streaming_response.update(
|
||||
ruleset_phase="ddos_l4",
|
||||
rules=[{}, {}, {}],
|
||||
rules=[{}],
|
||||
account_id="account_id",
|
||||
) as response:
|
||||
assert not response.is_closed
|
||||
|
|
@ -391,14 +271,14 @@ class TestAsyncPhases:
|
|||
with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"):
|
||||
await async_client.rulesets.phases.with_raw_response.update(
|
||||
ruleset_phase="ddos_l4",
|
||||
rules=[{}, {}, {}],
|
||||
rules=[{}],
|
||||
account_id="",
|
||||
)
|
||||
|
||||
with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"):
|
||||
await async_client.rulesets.phases.with_raw_response.update(
|
||||
ruleset_phase="ddos_l4",
|
||||
rules=[{}, {}, {}],
|
||||
rules=[{}],
|
||||
account_id="account_id",
|
||||
)
|
||||
|
||||
|
|
|
|||
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Reference in a new issue