test: change code to adapt to new werkzeug client
fix: avoid setting charset
utf8 is default and assumed now by werkzeug, setting this manually is
deprecated.
fix: use string instead of bytes for setting headers
DeprecationWarning: Passing bytes as a header value is deprecated and will not be supported in Werkzeug 3.0.
12:23:34 web.1 | response.headers["X-Page-Name"] = path.encode("ascii", errors="xmlcharrefreplace")
Use App client app directly instead of requests. This removes dependency
on needing a web server running for your tests. Also, contributes to
coverage now. We can see which lines are impacted with each use case.
This only affects OAuth clients that use `id_token` obtained from `frappe.integrations.oauth2.get_token`.
Doesn't affect OAuth clients that ignore id_token and explicitly use `frappe.integrations.oauth2.openid_profile` endpoint for getting user details. e.g. Frappe OAuth client.
A simple way to replicate this is to setup Frappe-Frappe OAuth client-server pair and use `login_via_oauth2_id_token` instead of `login_via_oauth2` in `login_via_frappe`.
The license.txt file has been replaced with LICENSE for quite a while
now. INAL but it didn't seem accurate to say "hey, checkout license.txt
although there's no such file". Apart from this, there were
inconsistencies in the headers altogether...this change brings
consistency.