Skip to content
Merged
Changes from 1 commit
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
9 changes: 5 additions & 4 deletions validation_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -373,7 +373,8 @@ def test_complete_without_fulfillment(self) -> None:

Given a newly created checkout session without fulfillment details,
When a completion request is submitted,
Then the server should return a 400 Bad Request error.
Then the server either rejects with a 4xx describing the fulfillment
problem, or returns an in-band error message with code 'missing'.
"""
response_json = self.create_checkout_session(select_fulfillment=False)
checkout_id = response_json["id"]
Expand All @@ -386,10 +387,10 @@ def test_complete_without_fulfillment(self) -> None:
headers=integration_test_utils.get_headers(),
)

self.assert_4xx_error(
self.assert_business_error(
response,
expected_status=400,
substring="Fulfillment address and option must be selected",
accepted_codes={"missing"},
error_4xx_substring="fulfillment",
)

def test_structured_error_messages(self) -> None:
Expand Down
Loading