Bump up django-upgrade

pull/580/head
Andrew Godwin 2023-05-13 11:20:47 -06:00
rodzic f4bbe78bd5
commit 46679a5c73
3 zmienionych plików z 8 dodań i 6 usunięć

Wyświetl plik

@ -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

Wyświetl plik

@ -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

Wyświetl plik

@ -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",
}
)