BlackSheep icon indicating copy to clipboard operation
BlackSheep copied to clipboard

accept to overwrite sent headers when using TestClient

Open ticapix opened this issue 1 month ago • 0 comments

Hello,

Somehow related to #501 , there is a bug when testing if we specify a header already defined in the helper.

        response = await test_client.get("/test", headers={"accept": "application/json"})

Bug:

The accept header is already set in the helper and the specified value is not send.

Expected:

The accept header sent is the one specified in the test call

ticapix avatar Jun 25 '24 23:06 ticapix