Neoteroi / BlackSheep

Fast ASGI web framework for Python
https://www.neoteroi.dev/blacksheep/
MIT License
1.86k stars 78 forks source link

accept to overwrite sent headers when using TestClient #503

Open ticapix opened 3 months ago

ticapix commented 3 months ago

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