Skip to content

Commit 166f3ad

Browse files
committed
made user secret generation visible
1 parent e6090d4 commit 166f3ad

File tree

2 files changed

+7
-4
lines changed

2 files changed

+7
-4
lines changed

pyproject.toml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -120,5 +120,4 @@ no_implicit_reexport = true
120120

121121
[[tool.mypy.overrides]]
122122
module = "ninja_extra.compatible.*"
123-
ignore_missing_imports = true
124-
check_untyped_defs = true
123+
ignore_errors = true

tests/test_async_auth.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
import base64
2+
13
import django
24
import pytest
35
from django.conf import settings
@@ -14,6 +16,8 @@
1416
async_django_auth,
1517
)
1618

19+
user_secret = base64.b64encode("admin:secret".encode("utf-8")).decode()
20+
1721

1822
async def callable_auth(request):
1923
return request.GET.get("auth")
@@ -182,13 +186,13 @@ async def test_csrf_on():
182186
("/basic", {}, 401, BODY_UNAUTHORIZED_DEFAULT),
183187
(
184188
"/basic",
185-
{"headers": {"Authorization": "Basic YWRtaW46c2VjcmV0"}},
189+
{"headers": {"Authorization": f"Basic {user_secret}"}},
186190
200,
187191
{"auth": "admin"},
188192
),
189193
(
190194
"/basic",
191-
{"headers": {"Authorization": "YWRtaW46c2VjcmV0"}},
195+
{"headers": {"Authorization": f"{user_secret}"}},
192196
200,
193197
{"auth": "admin"},
194198
),

0 commit comments

Comments
 (0)