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