Bump up django-upgrade
This commit is contained in:
parent
f4bbe78bd5
commit
46679a5c73
|
@ -21,10 +21,10 @@ repos:
|
|||
args: [--py310-plus]
|
||||
|
||||
- repo: https://github.com/adamchainz/django-upgrade
|
||||
rev: "1.12.0"
|
||||
rev: "1.13.0"
|
||||
hooks:
|
||||
- id: django-upgrade
|
||||
args: [--target-version, "4.1"]
|
||||
args: [--target-version, "4.2"]
|
||||
|
||||
- repo: https://github.com/psf/black
|
||||
rev: 22.10.0
|
||||
|
|
|
@ -87,9 +87,9 @@ class HttpSignature:
|
|||
if header_name == "(request-target)":
|
||||
value = f"{request.method.lower()} {request.path}"
|
||||
elif header_name == "content-type":
|
||||
value = request.META["CONTENT_TYPE"]
|
||||
value = request.headers["content-type"]
|
||||
elif header_name == "content-length":
|
||||
value = request.META["CONTENT_LENGTH"]
|
||||
value = request.headers["content-length"]
|
||||
else:
|
||||
value = request.META["HTTP_%s" % header_name.upper().replace("-", "_")]
|
||||
headers[header_name] = value
|
||||
|
|
|
@ -226,8 +226,10 @@ def api_token(identity) -> Token:
|
|||
@pytest.fixture
|
||||
def api_client(api_token):
|
||||
return Client(
|
||||
HTTP_AUTHORIZATION=f"Bearer {api_token.token}",
|
||||
HTTP_ACCEPT="application/json",
|
||||
headers={
|
||||
"authorization": f"Bearer {api_token.token}",
|
||||
"accept": "application/json",
|
||||
}
|
||||
)
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue