Skip to content
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

Sending Accept headers based on schema definition #1733

Open
hoog1511 opened this issue Apr 21, 2023 · 1 comment
Open

Sending Accept headers based on schema definition #1733

hoog1511 opened this issue Apr 21, 2023 · 1 comment
Assignees
Labels
Core: Transport Sending data to the tested app Priority: Low Cosmetic or low-impact changes Status: Needs Design Issue requires more design work Type: Feature New functionalities or enhancements

Comments

@hoog1511
Copy link

I am testing an API where there is a requirement to send specific Accept headers, the team that developed this API created their own media type containing version numbers of some sort.

When I test with Schemathesis I see that / is sent as a value for this header for every test. The / value sadly does not cover the value I need to send, is there any way I could change this in Schemathesis?

@hoog1511 hoog1511 added Status: Needs Triage Requires initial assessment to categorize and prioritize Type: Bug Errors or unexpected behavior labels Apr 21, 2023
@Stranger6667
Copy link
Member

Hi! Can you, please, share how such headers are represented in more detail? Are they represented in the schema?

Generally, headers can be overridden via CLI by the -H option or in Python tests by passing values as a dictionary in the headers keyword argument to case.call. I guess that the expected behavior would be if Schemathesis sends in Accept what is defined in the content keyword in response, right?

@Stranger6667 Stranger6667 added Priority: Low Cosmetic or low-impact changes Type: Feature New functionalities or enhancements Core: Transport Sending data to the tested app Status: Needs Design Issue requires more design work and removed Type: Bug Errors or unexpected behavior Status: Needs Triage Requires initial assessment to categorize and prioritize labels Oct 12, 2023
@Stranger6667 Stranger6667 changed the title [BUG]Question Sending Accept headers based on schema definition Oct 12, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Core: Transport Sending data to the tested app Priority: Low Cosmetic or low-impact changes Status: Needs Design Issue requires more design work Type: Feature New functionalities or enhancements
Projects
None yet
Development

No branches or pull requests

2 participants