Skip to content

chore: rebuild project due to codegen change #521

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Nov 18, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 10 additions & 10 deletions tests/api_resources/connect/test_sessions.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ def test_method_new(self, client: Finch) -> None:
session = client.connect.sessions.new(
customer_id="x",
customer_name="x",
products=["company", "directory", "individual"],
products=["company"],
)
assert_matches_type(SessionNewResponse, session, path=["response"])

Expand All @@ -34,7 +34,7 @@ def test_method_new_with_all_params(self, client: Finch) -> None:
session = client.connect.sessions.new(
customer_id="x",
customer_name="x",
products=["company", "directory", "individual"],
products=["company"],
customer_email="[email protected]",
integration={
"auth_method": "assisted",
Expand All @@ -52,7 +52,7 @@ def test_raw_response_new(self, client: Finch) -> None:
response = client.connect.sessions.with_raw_response.new(
customer_id="x",
customer_name="x",
products=["company", "directory", "individual"],
products=["company"],
)

assert response.is_closed is True
Expand All @@ -65,7 +65,7 @@ def test_streaming_response_new(self, client: Finch) -> None:
with client.connect.sessions.with_streaming_response.new(
customer_id="x",
customer_name="x",
products=["company", "directory", "individual"],
products=["company"],
) as response:
assert not response.is_closed
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
Expand All @@ -87,7 +87,7 @@ def test_method_reauthenticate_with_all_params(self, client: Finch) -> None:
session = client.connect.sessions.reauthenticate(
connection_id="connection_id",
minutes_to_expire=0,
products=["company", "directory", "individual"],
products=["company"],
redirect_uri="https://example.com",
)
assert_matches_type(SessionReauthenticateResponse, session, path=["response"])
Expand Down Expand Up @@ -125,7 +125,7 @@ async def test_method_new(self, async_client: AsyncFinch) -> None:
session = await async_client.connect.sessions.new(
customer_id="x",
customer_name="x",
products=["company", "directory", "individual"],
products=["company"],
)
assert_matches_type(SessionNewResponse, session, path=["response"])

Expand All @@ -134,7 +134,7 @@ async def test_method_new_with_all_params(self, async_client: AsyncFinch) -> Non
session = await async_client.connect.sessions.new(
customer_id="x",
customer_name="x",
products=["company", "directory", "individual"],
products=["company"],
customer_email="[email protected]",
integration={
"auth_method": "assisted",
Expand All @@ -152,7 +152,7 @@ async def test_raw_response_new(self, async_client: AsyncFinch) -> None:
response = await async_client.connect.sessions.with_raw_response.new(
customer_id="x",
customer_name="x",
products=["company", "directory", "individual"],
products=["company"],
)

assert response.is_closed is True
Expand All @@ -165,7 +165,7 @@ async def test_streaming_response_new(self, async_client: AsyncFinch) -> None:
async with async_client.connect.sessions.with_streaming_response.new(
customer_id="x",
customer_name="x",
products=["company", "directory", "individual"],
products=["company"],
) as response:
assert not response.is_closed
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
Expand All @@ -187,7 +187,7 @@ async def test_method_reauthenticate_with_all_params(self, async_client: AsyncFi
session = await async_client.connect.sessions.reauthenticate(
connection_id="connection_id",
minutes_to_expire=0,
products=["company", "directory", "individual"],
products=["company"],
redirect_uri="https://example.com",
)
assert_matches_type(SessionReauthenticateResponse, session, path=["response"])
Expand Down
4 changes: 2 additions & 2 deletions tests/api_resources/hris/benefits/test_individuals.py
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ def test_method_unenroll_many(self, client: Finch) -> None:
def test_method_unenroll_many_with_all_params(self, client: Finch) -> None:
individual = client.hris.benefits.individuals.unenroll_many(
benefit_id="benefit_id",
individual_ids=["string", "string", "string"],
individual_ids=["string"],
)
assert_matches_type(SyncSinglePage[UnenrolledIndividual], individual, path=["response"])

Expand Down Expand Up @@ -336,7 +336,7 @@ async def test_method_unenroll_many(self, async_client: AsyncFinch) -> None:
async def test_method_unenroll_many_with_all_params(self, async_client: AsyncFinch) -> None:
individual = await async_client.hris.benefits.individuals.unenroll_many(
benefit_id="benefit_id",
individual_ids=["string", "string", "string"],
individual_ids=["string"],
)
assert_matches_type(AsyncSinglePage[UnenrolledIndividual], individual, path=["response"])

Expand Down
36 changes: 6 additions & 30 deletions tests/api_resources/hris/test_employments.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,22 +21,14 @@ class TestEmployments:
@parametrize
def test_method_retrieve_many(self, client: Finch) -> None:
employment = client.hris.employments.retrieve_many(
requests=[
{"individual_id": "individual_id"},
{"individual_id": "individual_id"},
{"individual_id": "individual_id"},
],
requests=[{"individual_id": "individual_id"}],
)
assert_matches_type(SyncResponsesPage[EmploymentDataResponse], employment, path=["response"])

@parametrize
def test_raw_response_retrieve_many(self, client: Finch) -> None:
response = client.hris.employments.with_raw_response.retrieve_many(
requests=[
{"individual_id": "individual_id"},
{"individual_id": "individual_id"},
{"individual_id": "individual_id"},
],
requests=[{"individual_id": "individual_id"}],
)

assert response.is_closed is True
Expand All @@ -47,11 +39,7 @@ def test_raw_response_retrieve_many(self, client: Finch) -> None:
@parametrize
def test_streaming_response_retrieve_many(self, client: Finch) -> None:
with client.hris.employments.with_streaming_response.retrieve_many(
requests=[
{"individual_id": "individual_id"},
{"individual_id": "individual_id"},
{"individual_id": "individual_id"},
],
requests=[{"individual_id": "individual_id"}],
) as response:
assert not response.is_closed
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
Expand All @@ -68,22 +56,14 @@ class TestAsyncEmployments:
@parametrize
async def test_method_retrieve_many(self, async_client: AsyncFinch) -> None:
employment = await async_client.hris.employments.retrieve_many(
requests=[
{"individual_id": "individual_id"},
{"individual_id": "individual_id"},
{"individual_id": "individual_id"},
],
requests=[{"individual_id": "individual_id"}],
)
assert_matches_type(AsyncResponsesPage[EmploymentDataResponse], employment, path=["response"])

@parametrize
async def test_raw_response_retrieve_many(self, async_client: AsyncFinch) -> None:
response = await async_client.hris.employments.with_raw_response.retrieve_many(
requests=[
{"individual_id": "individual_id"},
{"individual_id": "individual_id"},
{"individual_id": "individual_id"},
],
requests=[{"individual_id": "individual_id"}],
)

assert response.is_closed is True
Expand All @@ -94,11 +74,7 @@ async def test_raw_response_retrieve_many(self, async_client: AsyncFinch) -> Non
@parametrize
async def test_streaming_response_retrieve_many(self, async_client: AsyncFinch) -> None:
async with async_client.hris.employments.with_streaming_response.retrieve_many(
requests=[
{"individual_id": "individual_id"},
{"individual_id": "individual_id"},
{"individual_id": "individual_id"},
],
requests=[{"individual_id": "individual_id"}],
) as response:
assert not response.is_closed
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
Expand Down
16 changes: 4 additions & 12 deletions tests/api_resources/hris/test_individuals.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,12 +26,8 @@ def test_method_retrieve_many(self, client: Finch) -> None:
@parametrize
def test_method_retrieve_many_with_all_params(self, client: Finch) -> None:
individual = client.hris.individuals.retrieve_many(
options={"include": ["string", "string", "string"]},
requests=[
{"individual_id": "individual_id"},
{"individual_id": "individual_id"},
{"individual_id": "individual_id"},
],
options={"include": ["string"]},
requests=[{"individual_id": "individual_id"}],
)
assert_matches_type(SyncResponsesPage[IndividualResponse], individual, path=["response"])

Expand Down Expand Up @@ -67,12 +63,8 @@ async def test_method_retrieve_many(self, async_client: AsyncFinch) -> None:
@parametrize
async def test_method_retrieve_many_with_all_params(self, async_client: AsyncFinch) -> None:
individual = await async_client.hris.individuals.retrieve_many(
options={"include": ["string", "string", "string"]},
requests=[
{"individual_id": "individual_id"},
{"individual_id": "individual_id"},
{"individual_id": "individual_id"},
],
options={"include": ["string"]},
requests=[{"individual_id": "individual_id"}],
)
assert_matches_type(AsyncResponsesPage[IndividualResponse], individual, path=["response"])

Expand Down
4 changes: 2 additions & 2 deletions tests/api_resources/payroll/test_pay_groups.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ def test_method_list(self, client: Finch) -> None:
def test_method_list_with_all_params(self, client: Finch) -> None:
pay_group = client.payroll.pay_groups.list(
individual_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
pay_frequencies=["string", "string", "string"],
pay_frequencies=["string"],
)
assert_matches_type(SyncSinglePage[PayGroupListResponse], pay_group, path=["response"])

Expand Down Expand Up @@ -140,7 +140,7 @@ async def test_method_list(self, async_client: AsyncFinch) -> None:
async def test_method_list_with_all_params(self, async_client: AsyncFinch) -> None:
pay_group = await async_client.payroll.pay_groups.list(
individual_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
pay_frequencies=["string", "string", "string"],
pay_frequencies=["string"],
)
assert_matches_type(AsyncSinglePage[PayGroupListResponse], pay_group, path=["response"])

Expand Down
4 changes: 2 additions & 2 deletions tests/api_resources/sandbox/connections/test_accounts.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ def test_method_create_with_all_params(self, client: Finch) -> None:
company_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
provider_id="provider_id",
authentication_type="credential",
products=["string", "string", "string"],
products=["string"],
)
assert_matches_type(AccountCreateResponse, account, path=["response"])

Expand Down Expand Up @@ -114,7 +114,7 @@ async def test_method_create_with_all_params(self, async_client: AsyncFinch) ->
company_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
provider_id="provider_id",
authentication_type="credential",
products=["string", "string", "string"],
products=["string"],
)
assert_matches_type(AccountCreateResponse, account, path=["response"])

Expand Down
Loading