[WIP] Pb import halfapi dans test_jwt_middleware.
This commit is contained in:
parent
f423d78278
commit
dd354648f8
|
@ -53,7 +53,6 @@ class JWTUser(BaseUser):
|
||||||
|
|
||||||
|
|
||||||
class JWTAuthenticationBackend(AuthenticationBackend):
|
class JWTAuthenticationBackend(AuthenticationBackend):
|
||||||
|
|
||||||
def __init__(self, secret_key: str, algorithm: str = 'HS256', prefix: str = 'JWT', name: str = 'name'):
|
def __init__(self, secret_key: str, algorithm: str = 'HS256', prefix: str = 'JWT', name: str = 'name'):
|
||||||
self.secret_key = secret_key
|
self.secret_key = secret_key
|
||||||
self.algorithm = algorithm
|
self.algorithm = algorithm
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
#!/usr/bin/env python3
|
#!/usr/bin/env python3
|
||||||
from starlette.exceptions import HTTPException
|
from starlette.exceptions import HTTPException
|
||||||
from halfapi.lib.responses import CSVResponse
|
from .responses import CSVResponse
|
||||||
|
|
||||||
"""
|
"""
|
||||||
This is the *query* library that contains all the useful functions to treat our
|
This is the *query* library that contains all the useful functions to treat our
|
||||||
|
|
|
@ -0,0 +1,4 @@
|
||||||
|
[pytest]
|
||||||
|
testpaths = tests halfapi
|
||||||
|
addopts = --doctest-modules
|
||||||
|
doctest_optionflags = ELLIPSIS
|
|
@ -0,0 +1,7 @@
|
||||||
|
import jwt
|
||||||
|
from halfapi import app
|
||||||
|
|
||||||
|
def coucou():
|
||||||
|
return
|
||||||
|
def test_connected():
|
||||||
|
app.route('/', coucou)
|
Loading…
Reference in New Issue